Commit f9d6014d authored by campaign's avatar campaign

by zhanyi

parent 785e4438
......@@ -77,10 +77,14 @@ kity.extendClass( Minder, {
if(callbacks.length == 0){
return;
}
var lastStatus = this.getStatus();
for ( var i = 0; i < callbacks.length; i++ ) {
callbacks[ i ].call( this, e );
if ( e.shouldStopPropagationImmediately() ) {
if ( this.getStatus() != lastStatus || e.shouldStopPropagationImmediately() ) {
break;
}
}
......
......@@ -61,11 +61,21 @@ KityMinder.registerModule( 'Zoom', function () {
'zoom-in': ZoomInCommand,
'zoom-out': ZoomOutCommand
},
addShortcutKeys: {
"zoom-in": "=", //=
"zoom-out": "-" //-
},
events: {
'normal.keydown':function(e){
var me = this;
var originEvent = e.originEvent;
var keyCode = originEvent.keyCode || originEvent.which;
if(keymap['='] == keyCode){
me.execCommand('zoom-in');
}
if(keymap['-'] == keyCode){
me.execCommand('zoom-out');
}
},
'ready': function () {
this._zoomValue = 1;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment