From e67c3d6e611dd57877afe0e05d80de54b46dd4f8 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 5 Aug 2022 11:00:09 -0600 Subject: [PATCH] Et2Tabs: Implement et2_IResizable --- api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts b/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts index e6bb1eac33..61bfdf04b6 100644 --- a/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts +++ b/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts @@ -15,9 +15,10 @@ import shoelace from "../../Styles/shoelace"; import {et2_createWidget} from "../../et2_core_widget"; import {colorsDefStyles} from "../../Styles/colorsDefStyles"; import {Et2InputWidget} from "../../Et2InputWidget/Et2InputWidget"; +import {et2_IResizeable} from "../../et2_core_interfaces"; -export class Et2Tabs extends Et2InputWidget(SlTabGroup) +export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeable { static get styles() { @@ -484,6 +485,15 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) } return super.setActiveTab(tab, options); } + + + resize(_height) + { + if(_height) + { + this.tabHeight = parseInt(this.tabHeight) + parseInt(_height); + } + } } customElements.define("et2-tabbox", Et2Tabs); \ No newline at end of file