|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { NodeButton } from "../../../base/single/button/button.node"; |
|
|
|
|
import { shortcut, extend, createWidget, Controller, count } from "../../../core"; |
|
|
|
|
import { shortcut, extend, createWidget, Controller, count, makeArray } from "../../../core"; |
|
|
|
|
|
|
|
|
|
@shortcut() |
|
|
|
|
export class MultiLayerIconArrowNode extends NodeButton { |
|
|
|
@ -22,7 +22,7 @@ export class MultiLayerIconArrowNode extends NodeButton {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_init() { |
|
|
|
|
super._init.apply(this, arguments); |
|
|
|
|
super._init(...arguments); |
|
|
|
|
const o = this.options; |
|
|
|
|
this.node = createWidget({ |
|
|
|
|
type: "bi.icon_arrow_node", |
|
|
|
@ -42,7 +42,7 @@ export class MultiLayerIconArrowNode extends NodeButton {
|
|
|
|
|
}); |
|
|
|
|
this.node.on(Controller.EVENT_CHANGE, (...args) => { |
|
|
|
|
this.setSelected(this.isSelected()); |
|
|
|
|
this.fireEvent(Controller.EVENT_CHANGE, args); |
|
|
|
|
this.fireEvent(Controller.EVENT_CHANGE, ...args); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const items = []; |
|
|
|
@ -57,7 +57,7 @@ export class MultiLayerIconArrowNode extends NodeButton {
|
|
|
|
|
createWidget({ |
|
|
|
|
type: "bi.horizontal_adapt", |
|
|
|
|
element: this, |
|
|
|
|
columnSize: BI.makeArray(o.layer, 15), |
|
|
|
|
columnSize: makeArray(o.layer, 15), |
|
|
|
|
items, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -79,17 +79,17 @@ export class MultiLayerIconArrowNode extends NodeButton {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setSelected(b) { |
|
|
|
|
super.setSelected.apply(this, arguments); |
|
|
|
|
super.setSelected(...arguments); |
|
|
|
|
this.node.setSelected(b); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
doClick() { |
|
|
|
|
super.doClick.apply(this, arguments); |
|
|
|
|
super.doClick(...arguments); |
|
|
|
|
this.node.setSelected(this.isSelected()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setOpened(v) { |
|
|
|
|
super.setOpened.apply(this, arguments); |
|
|
|
|
super.setOpened(...arguments); |
|
|
|
|
this.node.setOpened(v); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|