Skip to content

Commit

Permalink
fix removal of svg shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
kepper committed Dec 11, 2023
1 parent 15d9bef commit 674abab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/FacsimileComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,11 @@ export default {
return null
}
const existingOverlay = this.$refs.container.querySelector('svg')
const existingOverlay = this.$refs.container.querySelector('.svgContainer.shapes')
if (existingOverlay !== null) {
const oldActive = existingOverlay.querySelector('.activeWritingZone')
if (oldActive !== null) {
oldActive.classList.remove('activeWritingZone')
}
Expand All @@ -446,6 +448,8 @@ export default {
const loc = new OpenSeadragon.Rect(rects.image.x, rects.image.y, rects.image.w, rects.image.h, 0)
const svgContainer = document.createElement('div')
svgContainer.classList.add('svgContainer')
svgContainer.classList.add('shapes')
svgClone.setAttribute('style', 'transform: rotate(' + (rects.rotation * -1) + 'deg); transform-origin: top left;')
svgContainer.append(svgClone)
Expand Down

0 comments on commit 674abab

Please sign in to comment.