kopia lustrzana https://github.com/Tldraw/Tldraw
Fix line wobble (#1915)
Closes #1911 ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fixes an issue where lines would wobble as you dragged the handles aroundpull/1885/head^2
rodzic
6b37e9d0f5
commit
1b8c15316a
|
@ -79,8 +79,14 @@ export const Shape = track(function Shape({
|
||||||
if (!shape) return null
|
if (!shape) return null
|
||||||
|
|
||||||
const bounds = editor.getShapeGeometry(shape).bounds
|
const bounds = editor.getShapeGeometry(shape).bounds
|
||||||
setProperty('width', Math.max(1, bounds.width) + 'px')
|
setProperty(
|
||||||
setProperty('height', Math.max(1, bounds.height) + 'px')
|
'width',
|
||||||
|
`calc(${Math.max(1, Math.ceil(bounds.width)) + 'px'} * var(--tl-dpr-multiple))`
|
||||||
|
)
|
||||||
|
setProperty(
|
||||||
|
'height',
|
||||||
|
`calc(${Math.max(1, Math.ceil(bounds.height)) + 'px'} * var(--tl-dpr-multiple))`
|
||||||
|
)
|
||||||
},
|
},
|
||||||
[editor]
|
[editor]
|
||||||
)
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue