update stock index visuals on widget.add event
This commit is contained in:
parent
aa54857ed8
commit
e1d83b01c6
2 changed files with 6 additions and 1 deletions
|
|
@ -90,6 +90,12 @@ CAM.init = function(kiri, api) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.event.on("widget.add", widget => {
|
||||||
|
if (isCamMode) {
|
||||||
|
setAnimationStyle(api.conf.get());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// wire up animate button in ui
|
// wire up animate button in ui
|
||||||
api.event.on("function.animate", (mode) => {
|
api.event.on("function.animate", (mode) => {
|
||||||
if (isAnimate) {
|
if (isAnimate) {
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@ function platformUpdateTopZ(zdelta) {
|
||||||
const { process, stock } = current();
|
const { process, stock } = current();
|
||||||
const hasStock = stock.x && stock.y && stock.z;
|
const hasStock = stock.x && stock.y && stock.z;
|
||||||
const MODE = get_mode();
|
const MODE = get_mode();
|
||||||
|
|
||||||
api.widgets.each(widget => {
|
api.widgets.each(widget => {
|
||||||
if (MODE === MODES.CAM) {
|
if (MODE === MODES.CAM) {
|
||||||
const bounds = widget.getBoundingBox();
|
const bounds = widget.getBoundingBox();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue