diff --git a/TODO.otl b/TODO.otl index f5d67a2..ea58b0f 100755 --- a/TODO.otl +++ b/TODO.otl @@ -3,8 +3,8 @@ [_] 0% Priority work for 10.03.13 [_] change image [_] add page via template - [_] load/save state - [_] load/save from JSON + [_] load/save state (migrate) + [_] load/save from JSON (migrate) [_] basic instructions/docs... [_] page settngs in full view editor | could even be fixed... diff --git a/editor.js b/editor.js index a1d5ea4..7f063ae 100755 --- a/editor.js +++ b/editor.js @@ -359,6 +359,9 @@ var toggleInlineEditor = createCSSClassToggler( } }) +var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode') + + // this will set up the main editor event handlers and data... diff --git a/index.html b/index.html index 2333624..28c61f9 100755 --- a/index.html +++ b/index.html @@ -153,6 +153,41 @@ var keyboard_config = { }, }, + '.editor:not(.inline-editor-mode)': { + title: 'Editor mode.', + doc: '', + + // 0 + 48: function(){ + var n = getPageNumber() + if(togglePageView('?') == 'on'){ + setMagazineScale(getPageTargetScale(1)) + } else { + setMagazineScale(getPageTargetScale(PAGES_IN_RIBBON)) + } + setCurrentPage(n) + }, + Esc: 48, + + // + + 187: function(){ + var n = getPageNumber() + setMagazineScale(Math.min( + getMagazineScale() * 1.2, + getPageTargetScale(1))) + setCurrentPage(n) + }, + // - + 189: function(){ + var n = getPageNumber() + setMagazineScale(Math.max( + getMagazineScale() * 0.8, + getPageTargetScale(PAGES_IN_RIBBON*2))) + setCurrentPage(n) + }, + + }, + // ignore all keys except Esc here... '.inline-editor-mode': { title: 'Inline editor mode.', diff --git a/layout.js b/layout.js index ef16032..ff13fae 100755 --- a/layout.js +++ b/layout.js @@ -76,9 +76,6 @@ var togglePageView = createCSSClassToggler( }) -var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode') - - // XXX this is neither final nor usable... function prepareInlineCaptions(){ $('.page img[title]').each(function(){