zincjs 1.14.2 → 1.14.3

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": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "ZincJS (Web-based-Zinc-Visualisation)",
5
5
  "main": "build/zinc.js",
6
6
  "directories": {
@@ -64,6 +64,7 @@ const ZincObject = function() {
64
64
  //Default value of colour
65
65
  this.origColour = undefined;
66
66
  this.origVertexColors = false;
67
+ this.isPickable = true;
67
68
  }
68
69
 
69
70
  /**
@@ -199,7 +200,19 @@ ZincObject.prototype.setMesh = function(mesh, localTimeEnabled, localMorphColour
199
200
  }
200
201
 
201
202
  /**
202
- * Set the name for this ZincObject.
203
+ * Set isPickable for this ZincObject.
204
+ *
205
+ * @param {String} isPickable - Boolean to enable object pick.
206
+ */
207
+ ZincObject.prototype.setIsPickable = function(isPickable) {
208
+ if (this.isPickable !== isPickable) {
209
+ this.isPickable = isPickable;
210
+ if (this.region) this.region.pickableUpdateRequired = true;
211
+ }
212
+ }
213
+
214
+ /**
215
+ * Set the anatomicalId for this ZincObject.
203
216
  *
204
217
  * @param {String} anatomicalId - Id to be set.
205
218
  */
@@ -207,7 +220,6 @@ ZincObject.prototype.setAnatomicalId = function(anatomicalId) {
207
220
  this.anatomicalId = anatomicalId;
208
221
  }
209
222
 
210
-
211
223
  /**
212
224
  * Set the name for this ZincObject.
213
225
  *
package/src/region.js CHANGED
@@ -357,7 +357,7 @@ let Region = function (parentIn, sceneIn) {
357
357
  this.getPickableThreeJSObjects = (objectsList, transverse) => {
358
358
  if (group.visible) {
359
359
  zincObjects.forEach(zincObject => {
360
- if (zincObject.getGroup() && zincObject.getGroup().visible) {
360
+ if (zincObject.isPickable && zincObject.getGroup() && zincObject.getGroup().visible) {
361
361
  let marker = zincObject.marker;
362
362
  if (marker && marker.isEnabled()) {
363
363
  objectsList.push(marker.getMorph());