Skip to content

Commit

Permalink
unselect on page change, remove att corresp on DT
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Peter Voigt committed Nov 25, 2024
1 parent d1e22ea commit c7a00f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/store/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,6 @@ const dataModule = {
await dispatch('logChange', { path: atPath, baseMessage, param, xmlIDs: [annotElemRef.id], isNewDocument: false })

await dispatch('setActiveDiploTransElementId', diplomaticElement.getAttribute('xml:id'))
// TODO: clear activations?
dispatch('diploTransClear')
},

Expand Down
3 changes: 2 additions & 1 deletion src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,13 @@ export default createStore({
parseInt(Number(value)) === value &&
!isNaN(parseInt(value, 10))
}
if (isInt(i)) { // if i is integer select page
if (isInt(i) && +i !== getters.currentPageZeroBased) { // if i is integer and unequal to current page select page
console.log('setting current page to ' + i + ' (zero-based)')
commit('SET_WELLFORMED', true)
commit('SET_CURRENT_PAGE', i)
commit('SET_ACTIVE_WRITINGZONE', null)
router.replace({ query: { page: i + 1 } })
commit('CLEAR_DIPLO_TRANS_ITEMS')
} else { // else look for object with attributes (page, zone, wzid, layer) -- all int or undefined
const { page, zone, wzid, layer } = i
console.log(page, zone, layer)
Expand Down
2 changes: 1 addition & 1 deletion src/tools/mei.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function generateDiplomaticElement (annotElem, shapes, x, svgPath, corres
}
})
elem.setAttribute('facs', facs.join(' '))
elem.setAttribute('corresp', annotElem.getAttribute('xml:id'))
// elem.setAttribute('corresp', annotElem.getAttribute('xml:id'))

annotElem.setAttribute('corresp', correspPath + elem.getAttribute('xml:id'))

Expand Down

0 comments on commit c7a00f1

Please sign in to comment.