diff --git a/src/store/data/index.js b/src/store/data/index.js index 6be5cee..6c88b7f 100644 --- a/src/store/data/index.js +++ b/src/store/data/index.js @@ -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') }, diff --git a/src/store/index.js b/src/store/index.js index b98255f..b64616a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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) diff --git a/src/tools/mei.js b/src/tools/mei.js index bba9f98..b4a7dc7 100644 --- a/src/tools/mei.js +++ b/src/tools/mei.js @@ -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'))