Commit 75cfec60 authored by techird's avatar techird

fix context menu conflic

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