refboard: centralize image visible frame transforms

This commit is contained in:
Hiren Kangad
2026-03-13 12:58:29 +05:30
parent 768de39463
commit dc283124d7
4 changed files with 123 additions and 58 deletions
+4
View File
@@ -132,6 +132,8 @@ export function setupSync(
sx: data.sx,
sy: data.sy,
angle: data.angle,
flipX: data.flipX,
flipY: data.flipY,
}));
socket.emit('object:transform', { boardId, transforms });
moveTimer = setTimeout(() => { moveTimer = null; }, MOVE_THROTTLE);
@@ -225,6 +227,8 @@ export function setupSync(
item.data.sx = t.sx;
item.data.sy = t.sy;
item.data.angle = t.angle;
if (typeof t.flipX === 'boolean') item.data.flipX = t.flipX;
if (typeof t.flipY === 'boolean') item.data.flipY = t.flipY;
const obj = item.displayObject;
if (item.type === 'image') {
applyImageDisplayTransform(obj, item.data as ImageObject);