fix: clone on translate with alt key

This commit is contained in:
Konstantinos Kaloutas
2023-04-18 14:10:46 +03:00
committed by Tienson Qin
parent 0290e56c4d
commit ecb338c03d

View File

@@ -46,8 +46,8 @@ export class TranslatingState<
}
transaction(() => {
this.app.allSelectedShapesArray.filter(s => !s.props.isLocked).forEach(shape => {
shape.update({ point: Vec.add(initialPoints[shape.id], delta) })
this.app.allSelectedShapesArray.forEach(shape => {
if (!shape.props.isLocked) shape.update({ point: Vec.add(initialPoints[shape.id], delta) })
})
})
}
@@ -65,6 +65,7 @@ export class TranslatingState<
type: shape.type,
point: this.initialPoints[shape.id],
rotation: shape.props.rotation,
isLocked: false,
})
return clone
})