[SSE] Move sheet: drag and drop (fix bug with opening context menu)

This commit is contained in:
Julia Svinareva 2020-02-25 14:37:43 +03:00
parent 2f223cfb5e
commit 28a376f874
2 changed files with 8 additions and 1 deletions

View file

@ -161,7 +161,8 @@ define([
},
'cells:range': function(status){
me.onCellsRange(status);
}
},
'tabs:dragend': _.bind(me.onDragEndMouseUp, me)
});
Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me));
@ -1525,6 +1526,10 @@ define([
(data.type == 'mouseup') && (this.mouse.isLeftButtonDown = false);
},
onDragEndMouseUp: function() {
this.mouse.isLeftButtonDown = false;
},
onDocumentMouseMove: function(e) {
if (e.target.localName !== 'canvas') {
this.hideHyperlinkTip();

View file

@ -243,6 +243,7 @@ define([
var key = _.findWhere(arrData, {type: 'key'}).value;
if (Common.Utils.InternalSettings.get("sse-doc-info-key") === key) {
this.api.asc_moveWorksheet(index, _.findWhere(arrData, {type: 'indexes'}).value);
Common.NotificationCenter.trigger('tabs:dragend', this);
} else {
var names = [], wc = this.api.asc_getWorksheetsCount();
while (wc--) {
@ -284,6 +285,7 @@ define([
}
}
this.dropTabs = undefined;
Common.NotificationCenter.trigger('tabs:dragend', this);
}, this)
});