Skip to content

Commit

Permalink
[FIX] Fix IfcBuildingStorey elevation sort
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Nov 5, 2024
1 parent b33f227 commit ce135a1
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 ce135a1

Please sign in to comment.