[DE PE SSE] Fix eyedropper hidding

This commit is contained in:
JuliaSvinareva
2023-04-04 20:19:40 +03:00
parent 0f77c4c14b
commit da4d600e51
4 changed files with 5 additions and 6 deletions

View File

@ -229,7 +229,7 @@ define([
this.api.asc_registerCallback('asc_onHideMathTrack', _.bind(this.onHideMathTrack, this));
this.api.asc_registerPlaceholderCallback(AscCommon.PlaceholderButtonType.Image, _.bind(this.onInsertImage, this));
this.api.asc_registerPlaceholderCallback(AscCommon.PlaceholderButtonType.ImageUrl, _.bind(this.onInsertImageUrl, this));
this.api.asc_registerCallback('asc_onHideEyedropper', _.bind(this.hideEyedropper, this));
}
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));

View File

@ -956,8 +956,7 @@ define([
var application = this.getApplication(),
toolbarController = application.getController('Toolbar'),
toolbarView = toolbarController.getView(),
rightMenu = application.getController('RightMenu').getView('RightMenu'),
documentHolder = application.getController('DocumentHolder');
rightMenu = application.getController('RightMenu').getView('RightMenu');
if (this.appOptions.isEdit && toolbarView && (toolbarView.btnInsertShape.pressed || toolbarView.btnInsertText.pressed) &&
( !_.isObject(arguments[1]) || arguments[1].id !== 'tlbtn-insertshape')) { // TODO: Event from api is needed to clear btnInsertShape state
@ -976,8 +975,7 @@ define([
toolbarView._isEyedropperStart ? toolbarView._isEyedropperStart = false : rightMenu._isEyedropperStart = false;
this.api.asc_cancelEyedropper();
}
documentHolder.hideEyedropper();
documentHolder.getView().focus();
application.getController('DocumentHolder').getView().focus();
if (this.api && this.appOptions.isEdit && !toolbarView._state.previewmode) {
var cansave = this.api.asc_isDocumentCanSave(),

View File

@ -238,6 +238,7 @@ define([
me.api.asc_registerCallback('asc_onHideMathTrack', _.bind(me.onHideMathTrack, me));
me.api.asc_registerCallback('asc_onLockViewProps', _.bind(me.onLockViewProps, me, true));
me.api.asc_registerCallback('asc_onUnLockViewProps', _.bind(me.onLockViewProps, me, false));
me.api.asc_registerCallback('asc_onHideEyedropper', _.bind(me.hideEyedropper, me));
}
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect, me));
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));

View File

@ -396,6 +396,7 @@ define([
}
this.api.asc_registerCallback('asc_onShowMathTrack', _.bind(this.onShowMathTrack, this));
this.api.asc_registerCallback('asc_onHideMathTrack', _.bind(this.onHideMathTrack, this));
this.api.asc_registerCallback('asc_onHideEyedropper', _.bind(this.hideEyedropperTip, this));
}
this.api.asc_registerCallback('asc_onShowForeignCursorLabel', _.bind(this.onShowForeignCursorLabel, this));
this.api.asc_registerCallback('asc_onHideForeignCursorLabel', _.bind(this.onHideForeignCursorLabel, this));
@ -1981,7 +1982,6 @@ define([
colorEl.addClass('eyedropper-color');
colorEl.appendTo(document.body);
eyedropperTip.color = colorEl;
$('#ws-canvas-outer').on('mouseleave', _.bind(me.hideEyedropperTip, me));
}
eyedropperTip.color.css({
backgroundColor: '#' + hex,