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:
@ -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,
|
||||
|
Reference in New Issue
Block a user