|
|
@@ -4,8 +4,9 @@ import { LineShape, ShapeType } from 'types'
|
|
4
|
4
|
import { registerShapeUtils } from './index'
|
|
5
|
5
|
import { boundsContained } from 'utils/bounds'
|
|
6
|
6
|
import { intersectCircleBounds } from 'utils/intersections'
|
|
7
|
|
-import { DotCircle } from 'components/canvas/misc'
|
|
|
7
|
+import { DotCircle, ThinLine } from 'components/canvas/misc'
|
|
8
|
8
|
import { translateBounds } from 'utils/utils'
|
|
|
9
|
+import styled from 'styles'
|
|
9
|
10
|
|
|
10
|
11
|
const line = registerShapeUtils<LineShape>({
|
|
11
|
12
|
boundsCache: new WeakMap([]),
|
|
|
@@ -33,12 +34,12 @@ const line = registerShapeUtils<LineShape>({
|
|
33
|
34
|
},
|
|
34
|
35
|
|
|
35
|
36
|
render({ id, direction }) {
|
|
36
|
|
- const [x1, y1] = vec.add([0, 0], vec.mul(direction, 100000))
|
|
37
|
|
- const [x2, y2] = vec.sub([0, 0], vec.mul(direction, 100000))
|
|
|
37
|
+ const [x1, y1] = vec.add([0, 0], vec.mul(direction, 10000))
|
|
|
38
|
+ const [x2, y2] = vec.sub([0, 0], vec.mul(direction, 10000))
|
|
38
|
39
|
|
|
39
|
40
|
return (
|
|
40
|
41
|
<g id={id}>
|
|
41
|
|
- <line x1={x1} y1={y1} x2={x2} y2={y2} />
|
|
|
42
|
+ <ThinLine x1={x1} y1={y1} x2={x2} y2={y2} />
|
|
42
|
43
|
<DotCircle cx={0} cy={0} r={3} />
|
|
43
|
44
|
</g>
|
|
44
|
45
|
)
|