diff --git a/public/js/components/Dashboard/Item.js b/public/js/components/Dashboard/Item.js index 33e614531..b7a334b92 100644 --- a/public/js/components/Dashboard/Item.js +++ b/public/js/components/Dashboard/Item.js @@ -40,15 +40,30 @@ export default { "loading", "item_data", "place", + "setup", ], computed: { + maxHeight(){ + return this.setup?.height?.max; + }, + maxWidth(){ + if (Object.prototype.toString.call(this.setup?.width) == "[object Number]"){ + return this.setup?.width; + } + return this.setup?.width?.max; + }, + minHeight() { + return this.setup?.height?.min; + }, + minWidth() { + return this.setup?.width?.min; + }, + isResizeable(){ + return this.maxWidth >1 || this.maxHeight >1; + }, isPinned(){ return this.place?.pinned ? true : false; }, - isResizeable() { - if (!this.widget) return false; - return this.widget.setup.width.max || this.widget.setup.height.max; - }, ready() { return this.component && this.arguments !== null; }, @@ -138,7 +153,7 @@ export default { -
{{x}}-{{y}}