Skip to content

Commit

Permalink
remove this.$store.dispatch('setCurrentPage', 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
hizclick committed Oct 8, 2024
1 parent c4da141 commit 0767a48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 1 addition & 3 deletions src/components/OsdComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ export default {
})
console.log("this is the width of the current page ", this.$store.state.currentwidth)
this.$store.dispatch('setCurrentPage', 0)
})
})
this.unwatchCurrentPage = this.$store.watch((state, getters) => getters.currentPageIndexZeroBased,
(newPage, oldPage) => {
Expand Down
14 changes: 5 additions & 9 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,30 +107,26 @@ export default createStore({
state.selectedDirectory = gitdirec
},
SET_XML_DOC(state, xmlDoc) {
console.log("this is the xml doc in set ", xmlDoc)
console.log("this is the xml doc in set ", xmlDoc)
state.xmlDoc = xmlDoc
state.currentPage = 0
},
SET_PAGES(state, pageArray) {
state.pages = pageArray
console.log("this is the length of pages ", state.pages)
},
SET_USERNAME(state, username) {
state.username = username
},
SET_CURRENT_WIDTH(state, height) {
SET_CURRENT_HEIGHT(state, height) {
state.currentheight = height
},
SET_CURRENT_HEIGHT(state, width) {
SET_CURRENT_WIDTH(state, width) {
state.currentwidth = width
},
SET_PAGE_ARRAY(state, updatedArray) {
state.pages = toRaw(updatedArray)
console.log("this is the updated array ", state.pages)
},
SET_CURRENT_PAGE(state, i) {
console.log("current page is ", state.currentPage)
console.log("page is changed ", state.pages.length)
if (i > -1 && i < state.pages.length) {
state.currentPage = i
}
Expand Down Expand Up @@ -503,7 +499,6 @@ export default createStore({
commit('TOGGLE_MEASURE_LIST')
},
setCurrentPage({ commit }, i) {
console.log('setting current page to ' + i)
commit('SET_CURRENT_PAGE', i)
},
setWidth({ commit }, width) {
Expand Down Expand Up @@ -1145,8 +1140,9 @@ export default createStore({
tileSource: page.uri,
width: page.width
}
console.log("current width is ", state.currentwidth)
arr.push(obj)
console.log("array is ", arr)

})
return arr
},
Expand Down
4 changes: 2 additions & 2 deletions src/tools/iiif.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ export function getPageArray (mei) {
console.log("this is the n ", obj.n)
//obj.label = surface.getAttributeNS('', 'label').trim()
console.log("this is the label ", obj.label)
obj.width = parseInt(graphic.getAttributeNS('', 'width').trim(), 10)
obj.height = parseInt(graphic.getAttributeNS('', 'height').trim(), 10)
// obj.width = parseInt(graphic.getAttributeNS('', 'width').trim(), 10)
// obj.height = parseInt(graphic.getAttributeNS('', 'height').trim(), 10)
obj.hasSvg = surface.querySelector('svg') !== null // exists(svg:svg) inside relevant /surface
obj.hasZones = surface.querySelector('zone') !== null // exists(mei:zone) inside relevant /surface

Expand Down

0 comments on commit 0767a48

Please sign in to comment.