zincjs 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zincjs",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "ZincJS (Web-based-Zinc-Visualisation)",
5
5
  "type": "module",
6
6
  "main": "build/zinc.js",
@@ -461,7 +461,7 @@ const Glyphset = function () {
461
461
  this.morph.add(glyph.getGroup());
462
462
  }
463
463
  //Only display labels if the label list is available
464
- if (labels && displayLabels) {
464
+ if (labels && labels.length > 0 && displayLabels) {
465
465
  this.showLabel();
466
466
  }
467
467
  //Update the transformation of the glyphs.
@@ -284,7 +284,10 @@ const SceneLoader = function (sceneIn) {
284
284
  }
285
285
  let isInline = (options && options.isInline) ? options.isInline : undefined;
286
286
  let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;
287
- let displayLabels = options?.displayLabels ? options.displayLabels : true;
287
+ let displayLabels = options?.displayLabels;
288
+ if (displayLabels === undefined) {
289
+ displayLabels = true;
290
+ }
288
291
  let renderOrder = (options && "renderOrder" in options) ? options.renderOrder : undefined;
289
292
  const newGlyphset = new Glyphset();
290
293
  newGlyphset.setDuration(scene.getDuration());
@@ -760,7 +763,10 @@ const SceneLoader = function (sceneIn) {
760
763
  } else {
761
764
  newGeometryURL = item.Inline.GlyphGeometriesURL;
762
765
  }
763
- options.displayLabels = item.displayLabels ? item.displayLabels : true;
766
+ options.displayLabels = item.DisplayLabels;
767
+ if (options.displayLabels === undefined) {
768
+ options.displayLabels = true;
769
+ }
764
770
  options.loaderOptions.isGlyphsets = true;
765
771
  this.loadGlyphsetURL(region, newURL, newGeometryURL, groupName, finishCallback, options);
766
772
  break;