Skip to content

Commit 74b42a7

Browse files
committed
Added check for "Buffer", needs more work to deduplicate code, a
namespace for the schemas would be even better.
1 parent 71cedba commit 74b42a7

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

bimserverclient.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,9 @@ export class BimServerClient {
778778
}
779779

780780
let subject = this.schemas[schema][typeSubject];
781-
if (typeSubject == "GeometryInfo" || typeSubject == "GeometryData") {
781+
782+
// TODO duplicate code (also twice in model.js)
783+
if (typeSubject === "GeometryInfo" || typeSubject === "GeometryData" || typeSubject === "Buffer") {
782784
subject = this.schemas.geometry[typeSubject];
783785
}
784786

model.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export class Model {
151151

152152
extendClass(wrapperClass, typeName) {
153153
let realType = this.bimServerApi.schemas[this.schema][typeName];
154-
if (typeName === "GeometryInfo" || typeName === "GeometryData") {
154+
if (typeName === "GeometryInfo" || typeName === "GeometryData" || typeName === "Buffer") {
155155
realType = this.bimServerApi.schemas.geometry[typeName];
156156
}
157157
realType.superclasses.forEach((typeName) => {
@@ -454,7 +454,7 @@ export class Model {
454454
if (this.bimServerApi.classes[typeName] == null) {
455455
let realType = this.bimServerApi.schemas[this.schema][typeName];
456456
if (realType == null) {
457-
if (typeName === "GeometryInfo" || typeName === "GeometryData") {
457+
if (typeName === "GeometryInfo" || typeName === "GeometryData" || typeName === "Buffer") {
458458
realType = this.bimServerApi.schemas.geometry[typeName];
459459
}
460460
if (realType == null) {

0 commit comments

Comments
 (0)