Skip to content

Commit

Permalink
Fix creation of metamodels propertySets #1103
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Jul 18, 2023
1 parent 8ea08b6 commit 355ee52
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/viewer/metadata/PropertySet.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PropertySet {
/**
* @private
*/
constructor(id, originalSystemId, name, type, properties) {
constructor(params) {

/**
* Globally-unique ID for this PropertySet.
Expand All @@ -24,15 +24,15 @@ class PropertySet {
* @property id
* @type {String}
*/
this.id = id;
this.id = params.id;

/**
* ID of the corresponding object within the originating system, if any.
*
* @type {String}
* @abstract
*/
this.originalSystemId = originalSystemId;
this.originalSystemId = params.originalSystemId;

/**
* The MetaModels that share this PropertySet.
Expand All @@ -46,15 +46,15 @@ class PropertySet {
* @property name
* @type {String}
*/
this.name = name;
this.name = params.name;

/**
* Type of this PropertySet.
*
* @property type
* @type {String}
*/
this.type = type;
this.type = params.type;

/**
* Properties within this PropertySet.
Expand All @@ -64,7 +64,8 @@ class PropertySet {
*/
this.properties = [];

if (properties) {
if (params.properties) {
const properties = params.properties;
for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i];
this.properties.push(new Property(property.name, property.value, property.type, property.valueType, property.description));
Expand Down

0 comments on commit 355ee52

Please sign in to comment.