iobroker.mywebui 1.37.80 → 1.37.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.mywebui",
3
- "version": "1.37.80",
3
+ "version": "1.37.81",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -649,15 +649,21 @@ export class IobrokerWebuiScreenEditor extends BaseCustomWebComponentConstructor
649
649
  this.handlePropertyChanges();
650
650
  });
651
651
  }
652
+ _controlDefaultWidth = '800px';
653
+ _controlDefaultHeight = '600px';
652
654
  setWidth(w) {
653
- this.documentContainer.designerView.designerWidth = w ?? '100%';
655
+ const def = this._type === 'control' ? this._controlDefaultWidth : '100%';
656
+ this.documentContainer.designerView.designerWidth = w ?? def;
654
657
  }
655
658
  setHeight(h) {
656
- this.documentContainer.designerView.designerHeight = h ?? '100%';
659
+ const def = this._type === 'control' ? this._controlDefaultHeight : '100%';
660
+ this.documentContainer.designerView.designerHeight = h ?? def;
657
661
  }
658
662
  handlePropertyChanges() {
659
- this.documentContainer.designerView.designerWidth = this._settings.width ?? '100%';
660
- this.documentContainer.designerView.designerHeight = this._settings.height ?? '100%';
663
+ const defW = this._type === 'control' ? this._controlDefaultWidth : '100%';
664
+ const defH = this._type === 'control' ? this._controlDefaultHeight : '100%';
665
+ this.documentContainer.designerView.designerWidth = this._settings.width ?? defW;
666
+ this.documentContainer.designerView.designerHeight = this._settings.height ?? defH;
661
667
  }
662
668
  dispose() {
663
669
  this.removeBindings();