= {}
+ for (const ly of model.layers) {
+ for (const ob of ly.objects) {
+ if (ids.includes(ob.id)) orig[ob.id] = { d: ob.rotate }
+ }
+ }
+ rotateGroupRef.current = { ids, orig }
+ }, [selectedIds, model.layers])
return (
({ ...o, width: nw, height: nh }))
+ if (selectedIds.length > 1) {
+ const dw = nw - selected.width
+ const dh = nh - selected.height
+ updateObjects(selectedIds, (o) => ({
+ ...o,
+ width: Math.max(8, o.width + dw),
+ height: Math.max(8, o.height + dh),
+ }))
+ } else {
+ updateObject(selected.id, (o) => ({ ...o, width: nw, height: nh }))
+ }
}}
onRotate={({ rotate, inputEvent }) => {
if (!selected) return