|
@@ -55,10 +55,10 @@ export const useViewerStore = defineStore({
|
|
|
preview: null,
|
|
|
},
|
|
|
activeElementsTab: {
|
|
|
- leftPanelTab: 'THUMBS',
|
|
|
- rightPanelTab: 'GENERAL',
|
|
|
- stampPanelTab: 'STANDARD',
|
|
|
- signPanelTab: 'keyboard'
|
|
|
+ leftPanel: 'THUMBS',
|
|
|
+ rightPanel: 'GENERAL',
|
|
|
+ stampPanel: 'STANDARD',
|
|
|
+ signPanel: 'keyboard'
|
|
|
},
|
|
|
disabledElements: {
|
|
|
header: { disabled: false },
|
|
@@ -574,14 +574,15 @@ export const useViewerStore = defineStore({
|
|
|
addDigitalFileDialog: false
|
|
|
}
|
|
|
this.activeElementsTab = {
|
|
|
- leftPanelTab: 'THUMBS',
|
|
|
- rightPanelTab: 'GENERAL',
|
|
|
- stampPanelTab: 'STANDARD',
|
|
|
- signPanelTab: 'trackpad'
|
|
|
+ leftPanel: 'THUMBS',
|
|
|
+ rightPanel: 'GENERAL',
|
|
|
+ stampPanel: 'STANDARD',
|
|
|
+ signPanel: 'trackpad'
|
|
|
}
|
|
|
this.signatureVerify = 0
|
|
|
},
|
|
|
resetPanels () {
|
|
|
+ this.activeElements.leftPanel && this.closeElement('leftPanel')
|
|
|
this.searchStatus = false
|
|
|
this.activeElements = {
|
|
|
leftPanel: false,
|
|
@@ -627,10 +628,14 @@ export const useViewerStore = defineStore({
|
|
|
this.newScale = scale
|
|
|
},
|
|
|
openElement (dataElement) {
|
|
|
+ if(this.activeElements[dataElement]) return
|
|
|
this.activeElements[dataElement] = true
|
|
|
+ dataElement === 'leftPanel' && core.toggleSidebar()
|
|
|
},
|
|
|
closeElement (dataElement) {
|
|
|
+ if(!this.activeElements[dataElement]) return
|
|
|
this.activeElements[dataElement] = false
|
|
|
+ dataElement === 'leftPanel' && core.toggleSidebar() && setTimeout(() => core.webViewerPageMode('none'), 0)
|
|
|
},
|
|
|
toggleElement (dataElement) {
|
|
|
if (this.activeElements[dataElement]) {
|
|
@@ -639,8 +644,14 @@ export const useViewerStore = defineStore({
|
|
|
this.openElement(dataElement)
|
|
|
}
|
|
|
},
|
|
|
- setActiveElementTab (dataElement, tab) {
|
|
|
+ setActiveElementTab (dataElement, tab, mode) {
|
|
|
this.activeElementsTab[dataElement] = tab
|
|
|
+
|
|
|
+ const tabMap = {
|
|
|
+ THUMBS: 'thumbs',
|
|
|
+ OUTLINE: 'outline'
|
|
|
+ }
|
|
|
+ tabMap[tab] && setTimeout(() => core.webViewerPageMode(tabMap[tab]), 0)
|
|
|
},
|
|
|
toggleActiveStickNote () {
|
|
|
this.activeStickNote = !this.activeStickNote
|
|
@@ -677,7 +688,7 @@ export const useViewerStore = defineStore({
|
|
|
this.downloadError = text
|
|
|
},
|
|
|
setActiveSignWay (way) {
|
|
|
- this.activeElementsTab['signPanelTab'] = way
|
|
|
+ this.activeElementsTab['signPanel'] = way
|
|
|
},
|
|
|
setPopoverChanged (bool) {
|
|
|
this.popoverChanged = bool
|