[DE PE SSE] Fix bug 63924

This commit is contained in:
JuliaSvinareva
2023-09-01 16:57:13 +03:00
parent c501d463e5
commit a83887f4e5
7 changed files with 32 additions and 20 deletions

View File

@ -209,8 +209,8 @@ define([
},
onEyedropperStart: function () {
this.trigger('eyedropper:start', this);
Common.NotificationCenter.trigger('eyedropper:start');
this.trigger('eyedropper:start', this);
},
eyedropperEnd: function (r, g, b) {

View File

@ -341,6 +341,7 @@ define([
toolbar.btnParagraphColor.on('color:select', _.bind(this.onParagraphColorPickerSelect, this));
toolbar.btnParagraphColor.on('eyedropper:start', _.bind(this.onEyedropperStart, this));
toolbar.btnParagraphColor.on('eyedropper:end', _.bind(this.onEyedropperEnd, this));
this.mode.isEdit && Common.NotificationCenter.on('eyedropper:start', _.bind(this.eyedropperStart, this));
toolbar.mnuHighlightColorPicker.on('select', _.bind(this.onSelectHighlightColor, this));
toolbar.mnuHighlightTransparent.on('click', _.bind(this.onHighlightTransparentClick, this));
toolbar.mnuLineSpace.on('item:toggle', _.bind(this.onLineSpaceToggle, this));
@ -2694,6 +2695,16 @@ define([
Common.NotificationCenter.trigger('edit:complete', this);
},
eyedropperStart: function () {
if (this.toolbar.btnCopyStyle.pressed) {
this.toolbar.btnCopyStyle.toggle(false, true);
this.api.SetPaintFormat(AscCommon.c_oAscFormatPainterState.kOff);
this.modeAlwaysSetStyle = false;
}
if (this.toolbar.btnHighlightColor.pressed)
this.toolbar.btnHighlightColor.toggle(false, true);
},
onEyedropperStart: function (btn) {
this.toolbar._isEyedropperStart = true;
this.api.asc_startEyedropper(_.bind(btn.eyedropperEnd, btn));

View File

@ -1695,13 +1695,6 @@ define([
me.onUpdateLastCustomMargins();
Common.NotificationCenter.on('margins:update', _.bind(me.onUpdateLastCustomMargins, me));
Common.NotificationCenter.on('eyedropper:start', function () {
if (me.btnCopyStyle.pressed)
me.btnCopyStyle.toggle(false, true);
if (me.btnHighlightColor.pressed)
me.btnHighlightColor.toggle(false, true);
});
}
if ( me.isCompactView )

View File

@ -344,6 +344,7 @@ define([
toolbar.btnFontColor.on('color:select', _.bind(this.onSelectFontColor, this));
toolbar.btnFontColor.on('eyedropper:start', _.bind(this.onEyedropperStart, this));
toolbar.btnFontColor.on('eyedropper:end', _.bind(this.onEyedropperEnd, this));
this.mode.isEdit && Common.NotificationCenter.on('eyedropper:start', _.bind(this.eyedropperStart, this));
toolbar.btnHighlightColor.on('click', _.bind(this.onBtnHighlightColor, this));
toolbar.mnuHighlightColorPicker.on('select', _.bind(this.onSelectHighlightColor, this));
toolbar.mnuHighlightTransparent.on('click', _.bind(this.onHighlightTransparentClick, this));
@ -2861,6 +2862,16 @@ define([
}
},
eyedropperStart: function () {
if (this.toolbar.btnCopyStyle.pressed) {
this.toolbar.btnCopyStyle.toggle(false, true);
this.api.SetPaintFormat(AscCommon.c_oAscFormatPainterState.kOff);
this.modeAlwaysSetStyle = false;
}
if (this.toolbar.btnHighlightColor.pressed)
this.toolbar.btnHighlightColor.toggle(false, true);
},
onEyedropperStart: function (btn) {
this.toolbar._isEyedropperStart = true;
this.api.asc_startEyedropper(_.bind(btn.eyedropperEnd, btn));

View File

@ -1226,13 +1226,6 @@ define([
if ( mode.isEdit ) {
me.setTab('home');
me.processPanelVisible();
Common.NotificationCenter.on('eyedropper:start', function () {
if (me.btnCopyStyle.pressed)
me.btnCopyStyle.toggle(false, true);
if (me.btnHighlightColor.pressed)
me.btnHighlightColor.toggle(false, true);
});
}
if ( me.isCompactView )

View File

@ -398,6 +398,7 @@ define([
toolbar.btnBackColor.on('color:select', _.bind(this.onBackColorSelect, this));
toolbar.btnBackColor.on('eyedropper:start', _.bind(this.onEyedropperStart, this));
toolbar.btnBackColor.on('eyedropper:end', _.bind(this.onEyedropperEnd, this));
this.mode.isEdit && Common.NotificationCenter.on('eyedropper:start', _.bind(this.eyedropperStart, this));
toolbar.btnBorders.on('click', _.bind(this.onBorders, this));
if (toolbar.btnBorders.rendered) {
toolbar.btnBorders.menu.on('item:click', _.bind(this.onBordersMenu, this));
@ -5105,6 +5106,14 @@ define([
}
},
eyedropperStart: function () {
if (this.toolbar.btnCopyStyle.pressed) {
this.toolbar.btnCopyStyle.toggle(false, true);
this.api.asc_formatPainter(AscCommon.c_oAscFormatPainterState.kOff);
this.modeAlwaysSetStyle = false;
}
},
onEyedropperStart: function (btn) {
this.toolbar._isEyedropperStart = true;
this.api.asc_startEyedropper(_.bind(btn.eyedropperEnd, btn));

View File

@ -2259,11 +2259,6 @@ define([
}
me.setTab('home');
Common.NotificationCenter.on('eyedropper:start', function () {
if (me.btnCopyStyle.pressed)
me.btnCopyStyle.toggle(false, true);
});
}
if ( me.isCompactView )
me.setFolded(true);