guide line and magnet
This commit is contained in:
@@ -48,11 +48,8 @@ const RectangleShape = ({ obj, isSelected, onSelect, onUpdate, draggable }: Shap
|
||||
}
|
||||
}}
|
||||
onDragMove={(e) => {
|
||||
const node = e.target;
|
||||
onUpdate(obj.id, {
|
||||
x: node.x(),
|
||||
y: node.y(),
|
||||
});
|
||||
// Snapping is applied at Stage level, avoid store updates per frame.
|
||||
e.target.getLayer()?.batchDraw();
|
||||
}}
|
||||
onDragEnd={(e) => {
|
||||
const node = e.target;
|
||||
|
||||
Reference in New Issue
Block a user