Commit 75cfec60 authored by techird's avatar techird

fix context menu conflic

parent 2b1116d6
......@@ -27,10 +27,13 @@ KM.registerUI( 'contextmenu', function () {
}
});
me.$container.append($menu);
me.on('aftercontextmenu', function (e) {
me.on('contextmenu', function(e) {
e.preventDefault();
});
me.on('mouseup', function (e) {
//e.preventDefault();
if (me.getStatus() == 'hand') return;
if (me.getStatus() == 'hand' || !e.isRightMB()) return;
var node = e.getTargetNode();
if(node){
......
......@@ -43,11 +43,11 @@ kity.extendClass(Minder, {
if (this._fire(beforeEvent)) {
return;
}
preEvent = new MinderEvent('pre' + e.type, e, false);
executeEvent = new MinderEvent(e.type, e, false);
preEvent = new MinderEvent('pre' + e.type, e, true);
executeEvent = new MinderEvent(e.type, e, true);
this._fire(preEvent);
this._fire(executeEvent);
this._fire(preEvent) ||
this._fire(executeEvent) ||
this._fire(new MinderEvent('after' + e.type, e, false));
if (~'mousedown mouseup keydown keyup'.indexOf(e.type)) {
......
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