Disable/enable tooltips icons
This commit is contained in:
parent
395bd4e5f0
commit
dff1a08c12
@ -105,6 +105,14 @@ export class PdfViewerComponent implements OnInit, OnChanges {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private get _toggleTooltipsIcon(): string {
|
||||||
|
return this._convertPath(
|
||||||
|
this._userPreferenceService.getFilePreviewTooltipsPreference()
|
||||||
|
? '/assets/icons/general/pdftron-action-enable-tooltips.svg'
|
||||||
|
: '/assets/icons/general/pdftron-action-disable-tooltips.svg',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this._setReadyAndInitialState = this._setReadyAndInitialState.bind(this);
|
this._setReadyAndInitialState = this._setReadyAndInitialState.bind(this);
|
||||||
await this.loadViewer();
|
await this.loadViewer();
|
||||||
@ -354,13 +362,14 @@ export class PdfViewerComponent implements OnInit, OnChanges {
|
|||||||
type: 'actionButton',
|
type: 'actionButton',
|
||||||
element: 'tooltips',
|
element: 'tooltips',
|
||||||
dataElement: dataElements.TOGGLE_TOOLTIPS,
|
dataElement: dataElements.TOGGLE_TOOLTIPS,
|
||||||
img: this._convertPath('/assets/icons/general/pdftron-action-toggle-tooltips.svg'),
|
img: this._toggleTooltipsIcon,
|
||||||
title: this._toggleTooltipsBtnTitle,
|
title: this._toggleTooltipsBtnTitle,
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await this._userPreferenceService.toggleFilePreviewTooltipsPreference();
|
await this._userPreferenceService.toggleFilePreviewTooltipsPreference();
|
||||||
this._updateTooltipsVisibility();
|
this._updateTooltipsVisibility();
|
||||||
this.instance.UI.updateElement(dataElements.TOGGLE_TOOLTIPS, {
|
this.instance.UI.updateElement(dataElements.TOGGLE_TOOLTIPS, {
|
||||||
title: this._toggleTooltipsBtnTitle,
|
title: this._toggleTooltipsBtnTitle,
|
||||||
|
img: this._toggleTooltipsIcon,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg height="90px" version="1.1" viewBox="-10 -10 110 110" width="90px"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd" id="Symbols" stroke="none" stroke-width="1">
|
||||||
|
<g id="disable-tooltip">
|
||||||
|
<rect height="100" id="Rectangle" width="100" x="0" y="0"></rect>
|
||||||
|
<path
|
||||||
|
d="M50,0 C75,0 95,20 95,45 C95,45.3345638 94.9964181,45.6682321 94.9892904,46.0009689 L84.9863576,46.0005557 C84.9954332,45.6682544 85,45.3347165 85,45 C85,25.5 69.5,10 50,10 C30.5,10 15,25.5 15,45 C15,53.3152174 17.870983,61.1519376 23.1448539,67.5739706 L23.5,68 L25,69.5 L25,86 L43,79.5 L43.2,79.5 L43.2,89.79 L15,100 L15,73 C8.5,65 5,55.5 5,45 C5,20 25,0 50,0 Z M87.5553391,55 L94.6264069,62.0710678 L80.484,76.213 L94.6264069,90.3553391 L87.5553391,97.4264069 L73.413,83.284 L59.2710678,97.4264069 L52.2,90.3553391 L66.342,76.213 L52.2,62.0710678 L59.2710678,55 L73.413,69.142 L87.5553391,55 Z"
|
||||||
|
fill="#868E96" fill-rule="nonzero" id="Combined-Shape"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 630 B |
Loading…
x
Reference in New Issue
Block a user