floatingwidgets Api and 3dwidget frontend and 2d widget delete Api and zonecameraUpdation
This commit is contained in:
@@ -2,10 +2,17 @@ import { create } from "zustand";
|
||||
|
||||
type DroppedObject = {
|
||||
className: string;
|
||||
position: [number, number];
|
||||
id: string;
|
||||
position: {
|
||||
top: number | "auto";
|
||||
left: number | "auto";
|
||||
right: number | "auto";
|
||||
bottom: number | "auto";
|
||||
};
|
||||
value?: number;
|
||||
per?: string;
|
||||
header?: string;
|
||||
Data: {};
|
||||
};
|
||||
|
||||
type Zone = {
|
||||
@@ -21,7 +28,12 @@ type DroppedObjectsState = {
|
||||
updateObjectPosition: (
|
||||
zoneName: string,
|
||||
index: number,
|
||||
newPosition: [number, number]
|
||||
newPosition: {
|
||||
top: number | "auto";
|
||||
left: number | "auto";
|
||||
right: number | "auto";
|
||||
bottom: number | "auto";
|
||||
}
|
||||
) => void;
|
||||
};
|
||||
|
||||
@@ -64,15 +76,17 @@ export const useDroppedObjectsStore = create<DroppedObjectsState>((set) => ({
|
||||
}));
|
||||
|
||||
export interface DroppedObjects {
|
||||
header: string;
|
||||
value: string | number; // ✅ Allows both numbers and formatted strings
|
||||
per: string;
|
||||
className: string;
|
||||
position: [number, number]; // ✅ Ensures position is a tuple
|
||||
}
|
||||
|
||||
export interface Zones {
|
||||
zoneName: string;
|
||||
zoneId: string;
|
||||
objects: DroppedObject[];
|
||||
}
|
||||
header: string;
|
||||
id: string;
|
||||
Data: {};
|
||||
value: string | number; // ✅ Allows both numbers and formatted strings
|
||||
per: string;
|
||||
className: string;
|
||||
position: { top: number; left: number; right: number; bottom: number }; // ✅ Ensures position is a tuple
|
||||
}
|
||||
|
||||
export interface Zones {
|
||||
zoneName: string;
|
||||
zoneId: string;
|
||||
objects: DroppedObject[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user