Skip to content

Commit

Permalink
[FIX] TreeViewPlugin storey spatial sort robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Oct 15, 2024
1 parent b16a1cf commit 2913809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/TreeViewPlugin/TreeViewPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,8 @@ export class TreeViewPlugin extends Plugin {
if (!children || children.length === 0) {
return;
}
if (this._hierarchy === "storeys" && node.type === "IfcBuilding") {
// Assumes that children of an IfcBuilding will always be IfcBuildingStoreys
const firstChild = children[0];
if (this._hierarchy === "storeys" && firstChild.type === "IfcBuildingStorey") {
children.sort(this._getSpatialSortFunc());
} else {
children.sort(this._alphaSortFunc);
Expand Down

0 comments on commit 2913809

Please sign in to comment.