Don't show editor controls when dragging or resizing
[MAILPOET-1727]
This commit is contained in:
@@ -66,7 +66,11 @@ define([
|
|||||||
that.$el.removeClass('mailpoet_resize_active');
|
that.$el.removeClass('mailpoet_resize_active');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
showResizeHandle: function () { // eslint-disable-line func-names
|
showResizeHandle: function (mouseEvent) { // eslint-disable-line func-names
|
||||||
|
// Skip if user is dragging/resizing
|
||||||
|
if (!this.isBeingResized && mouseEvent && mouseEvent.buttons > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (typeof this.options.resizeHandleSelector === 'string') {
|
if (typeof this.options.resizeHandleSelector === 'string') {
|
||||||
this.view.$(this.options.resizeHandleSelector).removeClass('mailpoet_hidden');
|
this.view.$(this.options.resizeHandleSelector).removeClass('mailpoet_hidden');
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,11 @@ define([
|
|||||||
this.on('dom:refresh', this.showBlock, this);
|
this.on('dom:refresh', this.showBlock, this);
|
||||||
this._isFirstRender = true;
|
this._isFirstRender = true;
|
||||||
},
|
},
|
||||||
showTools: function showTools() {
|
showTools: function showTools(mouseEvent) {
|
||||||
|
// Skip if user is dragging/resizing
|
||||||
|
if (mouseEvent && mouseEvent.buttons > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!this.showingToolsDisabled) {
|
if (!this.showingToolsDisabled) {
|
||||||
this.$('> .mailpoet_tools').addClass('mailpoet_display_tools');
|
this.$('> .mailpoet_tools').addClass('mailpoet_display_tools');
|
||||||
this.toolsView.triggerMethod('showTools');
|
this.toolsView.triggerMethod('showTools');
|
||||||
|
@@ -192,7 +192,11 @@ define([
|
|||||||
this.$('> .mailpoet_container').attr('class',
|
this.$('> .mailpoet_container').attr('class',
|
||||||
'mailpoet_container mailpoet_container_' + this.model.get('orientation') + ' ' + classIrregular);
|
'mailpoet_container mailpoet_container_' + this.model.get('orientation') + ' ' + classIrregular);
|
||||||
},
|
},
|
||||||
showTools: function () {
|
showTools: function (mouseEvent) {
|
||||||
|
// Skip if user is dragging/resizing
|
||||||
|
if (mouseEvent && mouseEvent.buttons > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.renderOptions.depth === 1 && !this.$el.hasClass('mailpoet_container_layer_active')) {
|
if (this.renderOptions.depth === 1 && !this.$el.hasClass('mailpoet_container_layer_active')) {
|
||||||
this.$(this.ui.tools).addClass('mailpoet_display_tools');
|
this.$(this.ui.tools).addClass('mailpoet_display_tools');
|
||||||
this.$el.addClass('mailpoet_highlight');
|
this.$el.addClass('mailpoet_highlight');
|
||||||
|
Reference in New Issue
Block a user