File tree Expand file tree Collapse file tree 8 files changed +93
-81
lines changed Expand file tree Collapse file tree 8 files changed +93
-81
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<ellipse
3
+ v-bind =" $attrs"
3
4
:cx =" position.x"
4
5
:cy =" position.y"
5
6
:rx =" scaledRadius.x"
Original file line number Diff line number Diff line change 1
1
<template >
2
- <g :transform =" `rotate(${-rotation}, ${position.x}, ${position.y})`" >
2
+ <g
3
+ v-bind =" $attrs"
4
+ :transform =" `rotate(${-rotation}, ${position.x}, ${position.y})`"
5
+ >
3
6
<rect
4
7
v-if =" border"
5
8
:x =" position.x - scaledBoxWidth / 2"
Original file line number Diff line number Diff line change 1
1
<template >
2
- <line
3
- :x1 =" from.x"
4
- :y1 =" from.y"
5
- :x2 =" to.x"
6
- :y2 =" to.y"
7
- :stroke =" color"
8
- :stroke-width =" lineWidth * invScale"
9
- :stroke-dasharray =" dashArray"
10
- />
11
- <Label
12
- v-if =" label"
13
- :text =" label"
14
- :position =" labelPosition"
15
- :color =" color"
16
- :size =" labelSize"
17
- />
2
+ <g v-bind =" $attrs" >
3
+ <line
4
+ :x1 =" from.x"
5
+ :y1 =" from.y"
6
+ :x2 =" to.x"
7
+ :y2 =" to.y"
8
+ :stroke =" color"
9
+ :stroke-width =" lineWidth * invScale"
10
+ :stroke-dasharray =" dashArray"
11
+ />
12
+ <Label
13
+ v-if =" label"
14
+ :text =" label"
15
+ :position =" labelPosition"
16
+ :color =" color"
17
+ :size =" labelSize"
18
+ />
19
+ </g >
18
20
</template >
19
21
20
22
<script setup lang="ts">
Original file line number Diff line number Diff line change 1
1
<template >
2
- <circle
3
- :cx =" scaledPosition.x"
4
- :cy =" scaledPosition.y"
5
- :r =" radius"
6
- :fill =" filled ? color : 'none'"
7
- :stroke =" filled ? 'none' : color"
8
- :stroke-width =" lineWidth * invScale"
9
- />
2
+ <g v-bind =" $attrs" >
3
+ <circle
4
+ :cx =" scaledPosition.x"
5
+ :cy =" scaledPosition.y"
6
+ :r =" radius"
7
+ :fill =" filled ? color : 'none'"
8
+ :stroke =" filled ? 'none' : color"
9
+ :stroke-width =" lineWidth * invScale"
10
+ />
10
11
11
- <Label
12
- v-if =" label"
13
- :text =" label"
14
- :position =" labelPosition"
15
- :color =" color"
16
- size =" small"
17
- />
12
+ <Label
13
+ v-if =" label"
14
+ :text =" label"
15
+ :position =" labelPosition"
16
+ :color =" color"
17
+ size =" small"
18
+ />
19
+ </g >
18
20
</template >
19
21
20
22
<script setup lang="ts">
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<path
3
+ v-bind =" $attrs"
3
4
:d =" `M ${parsedPoints[0].x} ${parsedPoints[0].y} L ${parsedPoints
4
5
.slice(1)
5
6
.map((point) => `${point.x} ${point.y}`)
Original file line number Diff line number Diff line change 1
1
<template >
2
- <polygon
3
- :points =" `${points.map((p) => `${p.x},${p.y}`).join(' ')}`"
4
- :stroke =" stroke"
5
- :stroke-width =" lineWidth * invScale"
6
- :fill =" fill"
7
- />
2
+ <g v-bind =" $attrs" >
3
+ <polygon
4
+ :points =" `${points.map((p) => `${p.x},${p.y}`).join(' ')}`"
5
+ :stroke =" stroke"
6
+ :stroke-width =" lineWidth * invScale"
7
+ :fill =" fill"
8
+ />
8
9
9
- <Angle
10
- v-if =" props.angles"
11
- v-for =" angle in angles"
12
- :a =" angle.a"
13
- :b =" angle.b"
14
- :c =" angle.c"
15
- :radius =" angleRadius"
16
- :dashed =" angleDashed"
17
- />
10
+ <Angle
11
+ v-if =" props.angles"
12
+ v-for =" angle in angles"
13
+ :a =" angle.a"
14
+ :b =" angle.b"
15
+ :c =" angle.c"
16
+ :radius =" angleRadius"
17
+ :dashed =" angleDashed"
18
+ />
19
+ </g >
18
20
</template >
19
21
20
22
<script setup lang="ts">
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<path
3
+ v-bind =" $attrs"
3
4
:d =" `M ${position.x} ${position.y} L ${line1To.x} ${line1To.y} A ${scaledRadius} ${scaledRadius} 0 ${sweep} 0 ${line2To.x} ${line2To.y} L ${position.x} ${position.y} z`"
4
5
:stroke =" strokeColor"
5
6
:stroke-width =" lineWidth * invScale"
Original file line number Diff line number Diff line change 1
1
<template >
2
- <defs >
3
- <marker
4
- :id =" id"
5
- :refY =" arrowSize / 3"
6
- :markerWidth =" arrowSize"
7
- :markerHeight =" arrowSize / 1.5"
8
- orient =" auto"
9
- markerUnits =" userSpaceOnUse"
10
- >
11
- <polygon
12
- :points =" `0 0, ${arrowSize} ${arrowSize / 3}, 0 ${arrowSize / 1.5}`"
13
- :fill =" color"
14
- />
15
- </marker >
16
- </defs >
2
+ <g v-bind =" $attrs" >
3
+ <defs >
4
+ <marker
5
+ :id =" id"
6
+ :refY =" arrowSize / 3"
7
+ :markerWidth =" arrowSize"
8
+ :markerHeight =" arrowSize / 1.5"
9
+ orient =" auto"
10
+ markerUnits =" userSpaceOnUse"
11
+ >
12
+ <polygon
13
+ :points =" `0 0, ${arrowSize} ${arrowSize / 3}, 0 ${arrowSize / 1.5}`"
14
+ :fill =" color"
15
+ />
16
+ </marker >
17
+ </defs >
17
18
18
- <line
19
- :x1 =" from.x"
20
- :y1 =" from.y"
21
- :x2 =" to.x"
22
- :y2 =" to.y"
23
- :stroke-width =" lineWidth * invScale"
24
- :stroke =" color"
25
- :stroke-dasharray =" dashArray"
26
- :marker-end =" `url(#${id})`"
27
- />
19
+ <line
20
+ :x1 =" from.x"
21
+ :y1 =" from.y"
22
+ :x2 =" to.x"
23
+ :y2 =" to.y"
24
+ :stroke-width =" lineWidth * invScale"
25
+ :stroke =" color"
26
+ :stroke-dasharray =" dashArray"
27
+ :marker-end =" `url(#${id})`"
28
+ />
28
29
29
- <Label
30
- v-if =" label"
31
- :text =" label"
32
- :position =" labelPosition"
33
- :color =" color"
34
- :size =" labelSize"
35
- />
36
-
37
- <slot />
30
+ <Label
31
+ v-if =" label"
32
+ :text =" label"
33
+ :position =" labelPosition"
34
+ :color =" color"
35
+ :size =" labelSize"
36
+ />
37
+ </g >
38
38
</template >
39
39
40
40
<script setup lang="ts">
You can’t perform that action at this time.
0 commit comments