From b234fca7ddbdbeaca2b88cce137d9231bcce01b4 Mon Sep 17 00:00:00 2001 From: ethan Date: Sat, 23 Mar 2024 18:45:05 +0800 Subject: [PATCH] To incorporate double-arrow animation. --- debug/index.ts | 7 ++ index.html | 1 + src/arrow/double-arrow.ts | 54 ++++++++++-- src/base.ts | 175 +++++++++++++++++++++++++++++++++++++- src/interface.ts | 14 ++- 5 files changed, 240 insertions(+), 11 deletions(-) diff --git a/debug/index.ts b/debug/index.ts index 6cb9433..24a3f54 100644 --- a/debug/index.ts +++ b/debug/index.ts @@ -47,6 +47,7 @@ const editStartHandler = () => { const editEndHandler = (geometryPoints: any) => { console.error('editEnd', geometryPoints); }; + const buttonGroup = document.getElementById('button-group') as HTMLElement; buttonGroup.onclick = (evt) => { const targetElement = evt.target as HTMLElement; @@ -160,6 +161,12 @@ buttonGroup.onclick = (evt) => { geometry.off('editEnd', editEndHandler); } break; + + case 'startGrowthAnimation': + if (geometry) { + geometry.startGrowthAnimation(); + } + break; default: break; } diff --git a/index.html b/index.html index db3caff..81e4d85 100644 --- a/index.html +++ b/index.html @@ -68,6 +68,7 @@ +