Skip to content

Commit

Permalink
feat(event-display): better handling of labels object
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Feb 6, 2021
1 parent db261a6 commit e10a68d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/phoenix-event-display/src/loaders/phoenix-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class PhoenixLoader implements EventDataLoader {
/** Loading manager for loadable resources */
protected loadingManager: LoadingManager;
/** Object containing event object labels. */
protected labelsObject: { [key: string]: string } = {};
protected labelsObject: { [key: string]: any } = {};

/**
* Create the Phoenix loader.
Expand Down Expand Up @@ -395,7 +395,7 @@ export class PhoenixLoader implements EventDataLoader {
}
}

this.labelsObject[`${objectType}/${collection}/${indexInCollection}`] = label;
this.labelsObject[objectType][collection][indexInCollection] = label;
console.log(this.labelsObject);
}

Expand Down
3 changes: 2 additions & 1 deletion packages/phoenix-event-display/src/three/scene-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ export class SceneManager {
* @param uuid UUID of the three.js object.
*/
public addLabelToObject(label: string, uuid: string) {
this.scene.getObjectByProperty('uuid', uuid);
const object = this.scene.getObjectByProperty('uuid', uuid);
object.userData.label = label;
}
}

0 comments on commit e10a68d

Please sign in to comment.