Skip to content

Commit

Permalink
Merge pull request #1721 from xeokit/fix-storeys-elevation-sort
Browse files Browse the repository at this point in the history
[FIX] Fix IfcBuildingStorey elevation sort
  • Loading branch information
xeolabs authored Nov 5, 2024
2 parents b33f227 + ce135a1 commit 8bfb3a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,8 @@ class StoreyViewsPlugin extends Plugin {

if (storey1MetaObject && (storey1MetaObject.attributes && storey1MetaObject.attributes.elevation !== undefined) &&
storey2MetaObject && (storey2MetaObject.attributes && storey2MetaObject.attributes.elevation !== undefined)) {
const elevation1 = storey1MetaObject.attributes.elevation;
const elevation2 = storey2MetaObject.attributes.elevation;
const elevation1 = Number.parseFloat(storey1MetaObject.attributes.elevation);
const elevation2 = Number.parseFloat(storey2MetaObject.attributes.elevation);
if (elevation1 > elevation2) {
return -1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/TreeViewPlugin/TreeViewPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,8 @@ export class TreeViewPlugin extends Plugin {

if (storey1MetaObject && (storey1MetaObject.attributes && storey1MetaObject.attributes.elevation !== undefined) &&
storey2MetaObject && (storey2MetaObject.attributes && storey2MetaObject.attributes.elevation !== undefined)) {
const elevation1 = storey1MetaObject.attributes.elevation;
const elevation2 = storey2MetaObject.attributes.elevation;
const elevation1 = Number.parseFloat(storey1MetaObject.attributes.elevation);
const elevation2 = Number.parseFloat(storey2MetaObject.attributes.elevation);
if (elevation1 > elevation2) {
return -1;
}
Expand Down

0 comments on commit 8bfb3a3

Please sign in to comment.