[DE] Add handler for highlight visible part button in Page Thumbnails

This commit is contained in:
JuliaSvinareva 2021-10-14 14:04:36 +03:00
parent 836acf1698
commit 48241744f9
2 changed files with 5 additions and 2 deletions

View file

@ -59,6 +59,7 @@ define([
'show': _.bind(function () { 'show': _.bind(function () {
if (this.firstShow) { if (this.firstShow) {
this.api.asc_viewerThumbnailsResize(); this.api.asc_viewerThumbnailsResize();
this.api.asc_setViewerThumbnailsUsePageRect(Common.localStorage.getBool("de-thumbnails-highlight", true));
this.firstShow = false; this.firstShow = false;
} }
}, this) }, this)
@ -104,7 +105,9 @@ define([
onHighlightVisiblePart: function(menu, item, e) { onHighlightVisiblePart: function(menu, item, e) {
if (item.value === 'highlight') { if (item.value === 'highlight') {
//console.log(item.isChecked()); var checked = item.isChecked();
this.api.asc_setViewerThumbnailsUsePageRect(checked);
Common.localStorage.setBool("de-thumbnails-highlight", checked);
} }
}, },

View file

@ -110,7 +110,7 @@ define([
caption: this.textHighlightVisiblePart, caption: this.textHighlightVisiblePart,
checkable: true, checkable: true,
value: 'highlight', value: 'highlight',
toggleGroup: 'menuThumbnails' checked: Common.localStorage.getBool("de-thumbnails-highlight", true)
} }
] ]
}) })