mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 11:10:56 +08:00
Fix commit ef4149a
This commit is contained in:
committed by
Oleg Korshul
parent
ef4149aee4
commit
e3dd07bd13
@ -704,17 +704,17 @@ define([
|
||||
|
||||
if (this.appOptions.isEdit && toolbarView) {
|
||||
if (toolbarView.btnStrikeout.pressed && ( !_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-strikeout')) {
|
||||
if (arguments[1].id !== 'id-toolbar-btn-underline' && arguments[1].id !== 'id-toolbar-btn-highlight')
|
||||
if (!_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-underline' && arguments[1].id !== 'id-toolbar-btn-highlight')
|
||||
this.api.SetMarkerFormat(toolbarView.btnStrikeout.options.type, false);
|
||||
toolbarView.btnStrikeout.toggle(false, false);
|
||||
}
|
||||
if (toolbarView.btnUnderline.pressed && ( !_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-underline')) {
|
||||
if (arguments[1].id !== 'id-toolbar-btn-strikeout' && arguments[1].id !== 'id-toolbar-btn-highlight')
|
||||
if (!_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-strikeout' && arguments[1].id !== 'id-toolbar-btn-highlight')
|
||||
this.api.SetMarkerFormat(toolbarView.btnUnderline.options.type, false);
|
||||
toolbarView.btnUnderline.toggle(false, false);
|
||||
}
|
||||
if (toolbarView.btnHighlight.pressed && ( !_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-highlight')) {
|
||||
if (arguments[1].id !== 'id-toolbar-btn-underline' && arguments[1].id !== 'id-toolbar-btn-strikeout')
|
||||
if (!_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-underline' && arguments[1].id !== 'id-toolbar-btn-strikeout')
|
||||
this.api.SetMarkerFormat(toolbarView.btnHighlight.options.type, false);
|
||||
toolbarView.btnHighlight.toggle(false, false);
|
||||
}
|
||||
|
||||
@ -174,8 +174,8 @@ define([
|
||||
toolbar.btnPaste.on('click', _.bind(this.onCopyPaste, this, 'paste'));
|
||||
toolbar.btnCut.on('click', _.bind(this.onCopyPaste, this, 'cut'));
|
||||
toolbar.btnSelectAll.on('click', _.bind(this.onSelectAll, this));
|
||||
toolbar.btnSelectTool.on('click', _.bind(this.onSelectTool, this, 'select'));
|
||||
toolbar.btnHandTool.on('click', _.bind(this.onSelectTool, this, 'hand'));
|
||||
toolbar.btnSelectTool.on('toggle', _.bind(this.onSelectTool, this, 'select'));
|
||||
toolbar.btnHandTool.on('toggle', _.bind(this.onSelectTool, this, 'hand'));
|
||||
toolbar.btnAddComment.on('click', function (btn, e) {
|
||||
Common.NotificationCenter.trigger('app:comment:add', 'toolbar');
|
||||
});
|
||||
@ -475,11 +475,12 @@ define([
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Select All');
|
||||
},
|
||||
|
||||
onSelectTool: function (type, btn, e) {
|
||||
if (this.api)
|
||||
onSelectTool: function (type, btn, state, e) {
|
||||
if (this.api && state) {
|
||||
this.api.asc_setViewerTargetType(type);
|
||||
this.mode.isEdit && this.api.asc_StopInkDrawer();
|
||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
this.mode.isEdit && this.api.asc_StopInkDrawer();
|
||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
}
|
||||
},
|
||||
|
||||
onBtnStrikeout: function(btn) {
|
||||
|
||||
Reference in New Issue
Block a user