|
1 | 1 | <script> |
2 | | - import {SVG} from '@svgdotjs/svg.js' |
3 | | - import {onMount} from 'svelte' |
4 | | - import {DEFAULT_VALUE} from '@utils/constants' |
| 2 | + import { SVG } from '@svgdotjs/svg.js' |
| 3 | + import { onMount } from 'svelte' |
| 4 | + import { DEFAULT_VALUE } from '@utils/constants' |
5 | 5 |
|
6 | | - let {handleClick} = $props() |
| 6 | + let { handleClick } = $props() |
7 | 7 |
|
8 | 8 | let leftCircleEl = $state(null) |
9 | 9 | let leftCircleTextEl = $state(null) |
|
62 | 62 | rightCircleEl = SVG('path#rightCircle') |
63 | 63 | rightCircleTextEl = SVG('text#rightCircleText') |
64 | 64 |
|
65 | | - leftCircleEl.on('click', () => handlePathClick({left: true})) |
66 | | - leftCircleTextEl.on('click', () => handlePathClick({left: true})) |
67 | | - intersectOfCircleEl.on('click', () => handlePathClick({center: true})) |
68 | | - rightCircleEl.on('click', () => handlePathClick({right: true})) |
69 | | - rightCircleTextEl.on('click', () => handlePathClick({right: true})) |
| 65 | + leftCircleEl.on('click', () => handlePathClick({ left: true })) |
| 66 | + leftCircleTextEl.on('click', () => handlePathClick({ left: true })) |
| 67 | + intersectOfCircleEl.on('click', () => handlePathClick({ center: true })) |
| 68 | + rightCircleEl.on('click', () => handlePathClick({ right: true })) |
| 69 | + rightCircleTextEl.on('click', () => handlePathClick({ right: true })) |
70 | 70 |
|
71 | 71 | return () => { |
72 | 72 | leftCircleEl.off('click') |
|
0 commit comments