diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-19 10:29:26 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-19 10:29:26 +0800 |
commit | 5cb442ce9a7699928c540c3f917720c00ceabab4 (patch) | |
tree | d3c948760d404a777dfba9dd6cf41de0321997c0 /src | |
parent | c65378c3a828429fd50c94dfb06e884d1286d8f5 (diff) |
feat: animation for hiding leader-line
Diffstat (limited to 'src')
-rw-r--r-- | src/dumbyUtils.mjs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs index 40afbd3..13c1142 100644 --- a/src/dumbyUtils.mjs +++ b/src/dumbyUtils.mjs | |||
@@ -276,7 +276,12 @@ export const createDocLink = link => { | |||
276 | */ | 276 | */ |
277 | export const removeLeaderLines = link => { | 277 | export const removeLeaderLines = link => { |
278 | if (!link.lines) return | 278 | if (!link.lines) return |
279 | link.lines.forEach(line => line.remove()) | 279 | link.lines.forEach(line => { |
280 | line.hide('draw', { duration: 300 }) | ||
281 | setTimeout(() => { | ||
282 | line.remove() | ||
283 | }, 300) | ||
284 | }) | ||
280 | link.lines = [] | 285 | link.lines = [] |
281 | } | 286 | } |
282 | 287 | ||