如下圖所示:辨別為1和2的unit,

其背景資料的expanded屬性值,分别為true和false:
這個屬性的指派邏輯在unit-list.service.ts的第72行:unitTreeService.isExpanded方法,輸入參數分别是unit節點的id和在樹裡的層級結構:
對于Rustic unit來說,this.treeToggle$.value這個Map裡,沒有對應的資料。
The returned (boolean) expand state is driven by the global toggle
state (expand / collapse all) and the toggle state for individual units.
There’s also the minimalExpanded taken into consideration.
如果全局狀态是collapsed并且單個toggle狀态不是expand,則最後計算出來的expanded狀态為false.
this.minimalExpanded為1,意思是至少展開level為0的所有節點: