mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 09:48:21 +01:00
Re introduce the vboxchange, hboxchange events as many applications use it
This commit is contained in:
parent
f21a958ea0
commit
84cfc87ce0
@ -155,6 +155,7 @@ namespace OS {
|
|||||||
const auto_width = [];
|
const auto_width = [];
|
||||||
let ocwidth = 0;
|
let ocwidth = 0;
|
||||||
const avaiWidth = $(this).width() - this.padding * 2;
|
const avaiWidth = $(this).width() - this.padding * 2;
|
||||||
|
const avaiheight = $(this).innerHeight() - this.padding * 2;
|
||||||
$(this.refs.yield)
|
$(this.refs.yield)
|
||||||
.children()
|
.children()
|
||||||
.each(function (e) {
|
.each(function (e) {
|
||||||
@ -189,6 +190,10 @@ namespace OS {
|
|||||||
$(v).css("width", `${csize}px`)
|
$(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 = [];
|
const auto_height = [];
|
||||||
let ocheight = 0;
|
let ocheight = 0;
|
||||||
const avaiheight = $(this).innerHeight() - this.padding * 2;
|
const avaiheight = $(this).innerHeight() - this.padding * 2;
|
||||||
|
const avaiwidth = $(this).width() - this.padding * 2;
|
||||||
$(this.refs.yield)
|
$(this.refs.yield)
|
||||||
.children()
|
.children()
|
||||||
.each(function (e) {
|
.each(function (e) {
|
||||||
@ -237,6 +243,11 @@ namespace OS {
|
|||||||
$(v).css("height", `${csize}px`)
|
$(v).css("height", `${csize}px`)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.observable.trigger("vboxchange", {
|
||||||
|
id: this.aid,
|
||||||
|
data: { w: avaiwidth, h: avaiheight },
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user