added zooming in editor mode (to counter CKEdtor's toolbar placement issues when editing un-margined pages)...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-03-08 23:47:20 +04:00
parent 51d1270f2f
commit bcc490ab8d
4 changed files with 40 additions and 5 deletions

View File

@ -3,8 +3,8 @@
[_] 0% Priority work for 10.03.13 [_] 0% Priority work for 10.03.13
[_] change image [_] change image
[_] add page via template [_] add page via template
[_] load/save state [_] load/save state (migrate)
[_] load/save from JSON [_] load/save from JSON (migrate)
[_] basic instructions/docs... [_] basic instructions/docs...
[_] page settngs in full view editor [_] page settngs in full view editor
| could even be fixed... | could even be fixed...

View File

@ -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... // this will set up the main editor event handlers and data...

View File

@ -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... // ignore all keys except Esc here...
'.inline-editor-mode': { '.inline-editor-mode': {
title: 'Inline editor mode.', title: 'Inline editor mode.',

View File

@ -76,9 +76,6 @@ var togglePageView = createCSSClassToggler(
}) })
var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode')
// XXX this is neither final nor usable... // XXX this is neither final nor usable...
function prepareInlineCaptions(){ function prepareInlineCaptions(){
$('.page img[title]').each(function(){ $('.page img[title]').each(function(){