mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: remove rounding to fix jitter when shift-editing (#5543)
Co-authored-by: Ryan Di <ryan.weihao.di@gmail.com>
This commit is contained in:
parent
b818df1098
commit
45b592227d
3 changed files with 22 additions and 26 deletions
|
@ -178,17 +178,13 @@ export class LinearElementEditor {
|
|||
const referencePoint =
|
||||
element.points[selectedIndex === 0 ? 1 : selectedIndex - 1];
|
||||
|
||||
let [width, height] = LinearElementEditor._getShiftLockedDelta(
|
||||
const [width, height] = LinearElementEditor._getShiftLockedDelta(
|
||||
element,
|
||||
referencePoint,
|
||||
[scenePointerX, scenePointerY],
|
||||
appState.gridSize,
|
||||
);
|
||||
|
||||
// rounding to stop the dragged point from jiggling
|
||||
width = Math.round(width);
|
||||
height = Math.round(height);
|
||||
|
||||
LinearElementEditor.movePoints(element, [
|
||||
{
|
||||
index: selectedIndex,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue