feat: load widget image flow

This commit is contained in:
2026-06-24 07:59:52 +05:00
parent 5796a01a85
commit 99ebaceda3
5 changed files with 144 additions and 3 deletions
+5 -2
View File
@@ -8,7 +8,8 @@ export const defaultState = {
{ x: 340, y: 950 }
],
bgImage: null,
objectFit: 'contain'
objectFit: 'contain',
widgetImage: null
};
export const state = {
@@ -21,7 +22,8 @@ export const state = {
{ x: 340, y: 950 }
],
bgImage: null,
objectFit: 'contain'
objectFit: 'contain',
widgetImage: null
};
export function resetState() {
@@ -31,6 +33,7 @@ export function resetState() {
state.widgetH = defaultState.widgetH;
state.bgImage = null;
state.objectFit = defaultState.objectFit;
state.widgetImage = null;
defaultState.corners.forEach((c, i) => {
state.corners[i] = { x: c.x, y: c.y };
});