Merge pull request #3094 from ONLYOFFICE/fix/bug-65743

Bug 65743
This commit is contained in:
Julia Radzhabova
2024-07-24 18:00:59 +03:00
committed by GitHub
2 changed files with 16 additions and 3 deletions

View File

@ -133,7 +133,7 @@ define([
if (config.canUseSelectHandTools) {
me.statusbar.btnSelectTool.on('click', _.bind(me.onSelectTool, me, 'select'));
me.statusbar.btnHandTool.on('click', _.bind(me.onSelectTool, me, 'hand'));
me.statusbar.btnHandTool.toggle(true, true);
me.api.asc_registerCallback('asc_onChangeViewerTargetType', _.bind(me.onChangeViewerTargetType, me));
me.api.asc_setViewerTargetType('hand');
}
@ -358,6 +358,13 @@ define([
}
},
onChangeViewerTargetType: function(isHandMode) {
if (this.statusbar && this.statusbar.btnHandTool) {
this.statusbar.btnHandTool.toggle(isHandMode, true);
this.statusbar.btnSelectTool.toggle(!isHandMode, true);
}
},
zoomText : 'Zoom {0}%',
textHasChanges : 'New changes have been tracked',
textTrackChanges: 'The document is opened with the Track Changes mode enabled',

View File

@ -479,7 +479,7 @@ define([
this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo'));
this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo'));
this.api.asc_registerCallback('asc_onCanCopyCut', _.bind(this.onApiCanCopyCut, this));
this.api.asc_registerCallback('asc_onChangeViewerTargetType', _.bind(this.onChangeViewerTargetType, this));
}
}
this.api.asc_registerCallback('onPluginToolbarMenu', _.bind(this.onPluginToolbarMenu, this));
@ -3693,7 +3693,6 @@ define([
.onAppReady(config);
} else if (config.isRestrictedEdit && config.canFillForms && config.isPDFForm) {
if (me.toolbar.btnHandTool) {
me.toolbar.btnHandTool.toggle(true, true);
me.api.asc_setViewerTargetType('hand');
}
}
@ -3869,6 +3868,13 @@ define([
}
},
onChangeViewerTargetType: function(isHandMode) {
if (this.toolbar && this.toolbar.btnHandTool) {
this.toolbar.btnHandTool.toggle(isHandMode, true);
this.toolbar.btnSelectTool.toggle(!isHandMode, true);
}
},
onPluginToolbarMenu: function(data) {
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomItems(this.toolbar, data));
},