geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
37 lines (36 loc) • 898 B
JavaScript
const r = (h, a, l, i) => {
const e = a.scaleX(), x = a.scaleY();
l((c) => ({
...c,
squares: c.squares.map(
(t, s) => s === h ? {
...t,
width: Math.max(30, t.width * e),
height: Math.max(30, t.height * x),
x: a.x(),
y: a.y(),
rotation: a.rotation()
} : t
)
})), a.scaleX(1), a.scaleY(1), i();
}, g = (h, a, l, i, e) => {
const x = a.scaleX(), c = a.scaleY();
l((t) => ({
...t,
textBoxes: t.textBoxes.map(
(s, m) => m === h ? {
...s,
width: Math.max(30, s.width * x),
height: Math.max(30, s.height * c),
rotation: a.rotation(),
x: a.x(),
y: a.y()
} : s
)
})), a.scaleX(1), a.scaleY(1), i((t) => ({ ...t, isTransforming: !1 })), e();
};
export {
r as handleImageTransform,
g as handleTextTransform
};
//# sourceMappingURL=index.es94.js.map