From ece24f7a5efce959e7d8244841279d1c85778295 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Wed, 4 Jan 2023 00:45:57 +0100 Subject: [PATCH] Re introduce the vboxchange, hboxchange events as many applications use it --- src/core/tags/TileLayoutTags.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/core/tags/TileLayoutTags.ts b/src/core/tags/TileLayoutTags.ts index ffc32ef..9671bb7 100644 --- a/src/core/tags/TileLayoutTags.ts +++ b/src/core/tags/TileLayoutTags.ts @@ -155,6 +155,7 @@ namespace OS { const auto_width = []; let ocwidth = 0; const avaiWidth = $(this).width() - this.padding * 2; + const avaiheight = $(this).innerHeight() - this.padding * 2; $(this.refs.yield) .children() .each(function (e) { @@ -188,7 +189,11 @@ namespace OS { $.each(auto_width, (i, v) => $(v).css("width", `${csize}px`) ); - } + } + this.observable.trigger("hboxchange", { + id: this.aid, + data: { w: avaiWidth, h: avaiheight }, + }); } /** @@ -203,6 +208,7 @@ namespace OS { const auto_height = []; let ocheight = 0; const avaiheight = $(this).innerHeight() - this.padding * 2; + const avaiwidth = $(this).width() - this.padding * 2; $(this.refs.yield) .children() .each(function (e) { @@ -237,6 +243,11 @@ namespace OS { $(v).css("height", `${csize}px`) ); } + + this.observable.trigger("vboxchange", { + id: this.aid, + data: { w: avaiwidth, h: avaiheight }, + }); } /**