Skip to content

Commit

Permalink
PB-1121: PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ltkum committed Nov 15, 2024
1 parent 087aec6 commit a99adc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/map/components/CompareSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,12 @@ watch(storeCompareRatio, (newValue) => {
watch(visibleLayerOnTop, (newLayerOnTop, oldLayerOnTop) => {
unRegisterRenderingEvents(oldLayerOnTop.id)
olMap.renderSync()
registerRenderingEvents(newLayerOnTop.id)
olMap.renderSync()
})
onMounted(() => {
compareRatio.value = storeCompareRatio.value
registerRenderingEvents(visibleLayerOnTop.value.id)
//register event
olMap.render()
})
Expand Down Expand Up @@ -93,6 +90,9 @@ function onPreRender(event) {
if (compareRatio.value < 1.0 && compareRatio.value > 0.0) {
width = Math.round(width * compareRatio.value)
}
// We need to clear the color of the context. If we don't, the slider
// will leave the right side of the slider drawn on startup or when
// moving the slider.
context.clear(context.COLOR_BUFFER_BIT)
context.scissor(bottomLeft[0], bottomLeft[1], width, height)
Expand Down

0 comments on commit a99adc1

Please sign in to comment.