Skip to content

Commit f96881f

Browse files
committed
fix demo
1 parent 4fba7a5 commit f96881f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/docs/sandbox/Multi-touch_Scale_Stage.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ export default App;
295295
:config="stageConfig"
296296
@touchmove="handleTouchMove"
297297
@touchend="handleTouchEnd"
298+
@dragend="handleDragEnd"
298299
>
299300
<v-layer>
300301
<v-regular-polygon
@@ -428,6 +429,13 @@ const handleTouchEnd = () => {
428429
lastDist.value = 0;
429430
lastCenter.value = null;
430431
};
432+
433+
const handleDragEnd = (e) => {
434+
dragStopped.value = false;
435+
// Ensure stage position is synchronized with our reactive state
436+
const stage = e.target.getStage();
437+
stagePos.value = { x: stage.x(), y: stage.y() };
438+
};
431439
</script>
432440
```
433441
</TabItem>

0 commit comments

Comments
 (0)