Skip to content

Commit

Permalink
Fix IFCObjectDefaults: types with no props not falling back on "DEFAULT"
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed May 12, 2020
1 parent 2d41c8b commit b3e6ce3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/XKTLoaderPlugin/parsers/ParserV1.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function load(viewer, options, inflatedData, performanceModel) {
continue;
}

const props = options.objectDefaults ? options.objectDefaults[metaObject.type || "DEFAULT"] : null;
const props = options.objectDefaults ? options.objectDefaults[metaObject.type] || options.objectDefaults["DEFAULT"] : null;

if (props) {
if (props.visible === false) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/XKTLoaderPlugin/parsers/ParserV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function load(viewer, options, inflatedData, performanceModel) {
if (options.includeTypesMap && metaObject.type && (!options.includeTypesMap[metaObject.type])) {
continue;
}
const props = options.objectDefaults ? options.objectDefaults[metaObject.type || "DEFAULT"] : null;
const props = options.objectDefaults ? options.objectDefaults[metaObject.type] || options.objectDefaults["DEFAULT"] : null;
if (props) {
if (props.visible === false) {
entityDefaults.visible = false;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/XKTLoaderPlugin/parsers/ParserV3.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function load(viewer, options, inflatedData, performanceModel) {
continue;
}

const props = options.objectDefaults ? options.objectDefaults[metaObject.type || "DEFAULT"] : null;
const props = options.objectDefaults ? options.objectDefaults[metaObject.type] || options.objectDefaults["DEFAULT"] : null;

if (props) {
if (props.visible === false) {
Expand Down

0 comments on commit b3e6ce3

Please sign in to comment.