mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
added zoom to 100% btn
This commit is contained in:
@ -89,6 +89,7 @@ define([
|
||||
'ViewTab': {
|
||||
'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'),
|
||||
'zoom:towidth': _.bind(this.onBtnZoomTo, this, 'towidth'),
|
||||
'zoom:100': _.bind(this.onZoomTo100, this),
|
||||
'rulers:change': _.bind(this.onChangeRulers, this),
|
||||
'darkmode:change': _.bind(this.onChangeDarkMode, this),
|
||||
'macros:click': _.bind(this.onClickMacros, this),
|
||||
@ -360,6 +361,10 @@ define([
|
||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||
},
|
||||
|
||||
onZoomTo100: function () {
|
||||
this.api && this.api.zoom(100);
|
||||
},
|
||||
|
||||
onChangeRulers: function (btn, checked) {
|
||||
Common.localStorage.setBool('de-hidden-rulers', !checked);
|
||||
Common.Utils.InternalSettings.set("de-hidden-rulers", !checked);
|
||||
|
||||
@ -63,6 +63,9 @@ define([
|
||||
'<span class="btn-slot text font-size-normal slot-lbl-zoom" style="text-align: center;margin-top: 4px;"></span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="group">' +
|
||||
'<span class="btn-slot text x-huge" id="slot-btn-zoom-100"></span>' +
|
||||
'</div>' +
|
||||
'<div class="group small">' +
|
||||
'<div class="elset">' +
|
||||
'<span class="btn-slot text slot-btn-ftp" style="text-align: center;"></span>' +
|
||||
@ -156,6 +159,9 @@ define([
|
||||
me.btnMultiplePages.on('click', _.bind(function (e) {
|
||||
me.fireEvent('pages:multiple', [e.pressed]);
|
||||
}, me));
|
||||
me.btnZoom100.on('click', _.bind(function (e) {
|
||||
me.fireEvent('zoom:100');
|
||||
}, me));
|
||||
me.cmbsZoom.forEach(function (cmb) {
|
||||
cmb.on('combo:focusin', _.bind(me.onComboOpen, this, false));
|
||||
cmb.on('show:after', _.bind(me.onComboOpen, this, true));
|
||||
@ -311,6 +317,17 @@ define([
|
||||
});
|
||||
this.lockedControls.push(this.btnMultiplePages);
|
||||
|
||||
this.btnZoom100 = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-zoom-100',
|
||||
lock: [_set.lostConnect, _set.disableOnStart],
|
||||
caption: this.textZoom100,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small',
|
||||
});
|
||||
this.lockedControls.push(this.btnZoom100);
|
||||
|
||||
if (
|
||||
this.appConfig.isEdit &&
|
||||
!(this.appConfig.customization && this.appConfig.customization.macros===false) &&
|
||||
@ -427,6 +444,7 @@ define([
|
||||
this.btnInterfaceTheme.render($host.find('#slot-btn-interface-theme'));
|
||||
this.btnDarkDocument.render($host.find('#slot-btn-dark-document'));
|
||||
this.btnMultiplePages.render($host.find('#slot-btn-multiple-pages'));
|
||||
this.btnZoom100.render($host.find('#slot-btn-zoom-100'));
|
||||
this.chStatusbar.render($host.find('#slot-chk-statusbar'));
|
||||
this.chToolbar.render($host.find('#slot-chk-toolbar'));
|
||||
this.chRulers.render($host.find('#slot-chk-rulers'));
|
||||
@ -461,7 +479,8 @@ define([
|
||||
this.btnNavigation.updateHint(this.tipHeadings);
|
||||
this.btnInterfaceTheme.updateHint(this.tipInterfaceTheme);
|
||||
this.btnDarkDocument.updateHint(this.tipDarkDocument);
|
||||
this.btnMultiplePages.updateHint(this.tipMultiplePages)
|
||||
this.btnMultiplePages.updateHint(this.tipMultiplePages);
|
||||
this.btnZoom100.updateHint(this.tipZoom100);
|
||||
this.btnsFitToPage.forEach(function (btn) {
|
||||
btn.updateHint(me.tipFitToPage);
|
||||
});
|
||||
|
||||
@ -4294,6 +4294,7 @@
|
||||
"DE.Views.ViewTab.textTabStyle": "Tab style",
|
||||
"DE.Views.ViewTab.textZoom": "Zoom",
|
||||
"DE.Views.ViewTab.textMultiplePages": "Multiple Pages",
|
||||
"DE.Views.ViewTab.textZoom100": "Zoom to 100%",
|
||||
"DE.Views.ViewTab.tipDarkDocument": "Dark document",
|
||||
"DE.Views.ViewTab.tipFitToPage": "Fit to page",
|
||||
"DE.Views.ViewTab.tipFitToWidth": "Fit to width",
|
||||
@ -4305,6 +4306,7 @@
|
||||
"DE.Views.ViewTab.tipResumeMacro": "Resume recording",
|
||||
"DE.Views.ViewTab.tipStopMacro": "Stop recording",
|
||||
"DE.Views.ViewTab.tipMultiplePages": "Multiple pages",
|
||||
"DE.Views.ViewTab.tipZoom100": "Zoom to 100%",
|
||||
"DE.Views.WatermarkSettingsDialog.textAuto": "Auto",
|
||||
"DE.Views.WatermarkSettingsDialog.textBold": "Bold",
|
||||
"DE.Views.WatermarkSettingsDialog.textColor": "Text color",
|
||||
|
||||
Reference in New Issue
Block a user