simplified resize events

This commit is contained in:
peterkogo
2024-04-11 15:14:39 +02:00
parent 63aa0dd713
commit 72d775b8eb
3 changed files with 163 additions and 162 deletions
@@ -66,7 +66,7 @@ function ResizeControl({
const changes: NodeChange[] = [];
if (change.isXPosChange || change.isYPosChange) {
if (change.x !== undefined && change.y !== undefined) {
const positionChange: NodePositionChange = {
id,
type: 'position',
@@ -79,7 +79,7 @@ function ResizeControl({
changes.push(positionChange);
}
if (change.isWidthChange || change.isHeightChange) {
if (change.width !== undefined && change.height !== undefined) {
const dimensionChange: NodeDimensionChange = {
id,
type: 'dimensions',