feat: added sidebar widget drop

fix: corrected color picker value, drag and drop
This commit is contained in:
paul
2024-09-22 12:39:03 +05:30
parent a440b46e9b
commit 740a5400f8
13 changed files with 164 additions and 158 deletions

16
src/utils/widget.js Normal file
View File

@@ -0,0 +1,16 @@
import Widget from "../canvas/widgets/base"
// checks if the object is instance is instance of widget class
export const isSubClassOfWidget = (_class) => {
return Widget.isPrototypeOf(_class) || _class === Widget
}
export const isInstanceOfWidget = (_class) => {
console.log("Widget is instance of Object: ", _class)
return _class instanceof Widget
}