geojs 1.14.11 → 1.14.12

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/geo.js CHANGED
@@ -6430,7 +6430,6 @@ var _feature = function feature(arg) {
6430
6430
  }
6431
6431
  if (m_visible !== val || direct) {
6432
6432
  m_visible = val;
6433
- m_this.modified();
6434
6433
  if (m_layer && m_layer.visible && !m_layer.visible()) {
6435
6434
  val = false;
6436
6435
  }
@@ -13258,9 +13257,16 @@ var _svgRenderer = function svgRenderer(arg) {
13258
13257
  return m_this;
13259
13258
  };
13260
13259
 
13260
+ /**
13261
+ * Schedule an update in the next render frame.
13262
+ */
13263
+ this._scheduleUpdate = function () {
13264
+ m_this.layer().map().scheduleAnimationFrame(m_this._renderFrame);
13265
+ };
13266
+
13261
13267
  /**
13262
13268
  * Render all features that are marked as needing an update. This should
13263
- * only be called duration an animation frame.
13269
+ * only be called during an animation frame.
13264
13270
  */
13265
13271
  this._renderFrame = function () {
13266
13272
  var id;
@@ -13276,6 +13282,11 @@ var _svgRenderer = function svgRenderer(arg) {
13276
13282
  m_this._renderFeature(id);
13277
13283
  }
13278
13284
  }
13285
+ for (id in m_features) {
13286
+ if (m_features.hasOwnProperty(id) && ids[id] === undefined) {
13287
+ m_this.select(id).attr('visibility', !m_features[id].visible || m_features[id].visible() ? 'visible' : 'hidden');
13288
+ }
13289
+ }
13279
13290
  };
13280
13291
 
13281
13292
  /**
@@ -13290,6 +13301,7 @@ var _svgRenderer = function svgRenderer(arg) {
13290
13301
  if (!m_features[id]) {
13291
13302
  return m_this;
13292
13303
  }
13304
+ m_this.select(id).remove();
13293
13305
  var data = m_features[id].data,
13294
13306
  index = m_features[id].index,
13295
13307
  style = m_features[id].style,
@@ -13309,7 +13321,7 @@ var _svgRenderer = function svgRenderer(arg) {
13309
13321
  rendersel.attr('class', classes.concat([id]).join(' '));
13310
13322
  setStyles(rendersel, style);
13311
13323
  if (visible) {
13312
- rendersel.style('visibility', visible() ? 'visible' : 'hidden');
13324
+ rendersel.attr('visibility', visible() ? 'visible' : 'hidden');
13313
13325
  }
13314
13326
  if (entries.size() && m_features[id].sortByZ) {
13315
13327
  selection.sort(function (a, b) {
@@ -26454,7 +26466,7 @@ module.exports = svg_tileLayer;
26454
26466
  * @constant
26455
26467
  * @type {string}
26456
26468
  */
26457
- module.exports = "1.14.11";
26469
+ module.exports = "1.14.12";
26458
26470
 
26459
26471
  /***/ }),
26460
26472
 
@@ -28771,6 +28783,7 @@ var _svg_object = function svg_object(arg) {
28771
28783
  var m_id = 'svg-' + uniqueID(),
28772
28784
  s_exit = this._exit,
28773
28785
  m_this = this,
28786
+ s_visible = this.visible,
28774
28787
  s_draw = this.draw;
28775
28788
  this._svgid = function () {
28776
28789
  return m_id;
@@ -28805,6 +28818,26 @@ var _svg_object = function svg_object(arg) {
28805
28818
  m_this.renderer()._removeFeature(m_this._svgid());
28806
28819
  s_exit();
28807
28820
  };
28821
+
28822
+ /**
28823
+ * Get/Set the visibility of the feature.
28824
+ *
28825
+ * @param {boolean} [val] A boolean to change the visibility, or `undefined`
28826
+ * to return the visibility.
28827
+ * @param {boolean} [direct] If `true`, when getting the visibility,
28828
+ * disregard the visibility of the parent layer, and when setting, refresh
28829
+ * the state regardless of whether it has changed or not. Otherwise, the
28830
+ * functional visibility is returned, where both the feature and the layer
28831
+ * must be visible for a `true` result.
28832
+ * @returns {boolean|this} Either the visibility (if getting) or the feature
28833
+ * (if setting).
28834
+ */
28835
+ this.visible = function (val, direct) {
28836
+ if (val !== undefined && val !== s_visible(undefined, true) && m_this.renderer()) {
28837
+ m_this.renderer()._scheduleUpdate();
28838
+ }
28839
+ return s_visible(val, direct);
28840
+ };
28808
28841
  return this;
28809
28842
  };
28810
28843
  module.exports = _svg_object;
@@ -89675,12 +89708,6 @@ var _pointFeature = function pointFeature(arg) {
89675
89708
  var d = clusters[cidx];
89676
89709
  // mark the datum as a cluster for accessor methods
89677
89710
  d.__cluster = true;
89678
-
89679
- // store all of the data objects for each point in the cluster as __data
89680
- d.__data = new Array(d.obj.length);
89681
- for (var idx = 0; idx < d.obj.length; idx += 1) {
89682
- d.__data[idx] = m_allData[d.obj[idx].index];
89683
- }
89684
89711
  data[didx] = d;
89685
89712
  }
89686
89713
 
@@ -97908,7 +97935,7 @@ module.exports = "/* quadFeature Color fragment shader */\n\nvarying mediump vec
97908
97935
  * @constant
97909
97936
  * @type {string}
97910
97937
  */
97911
- module.exports = "a43155ff2781340b3078647437dd1d136c744d7f";
97938
+ module.exports = "77d74f3f2551728136c961f0023bcf74e19e6fb0";
97912
97939
 
97913
97940
  /***/ }),
97914
97941
 
package/geo.lean.js CHANGED
@@ -6430,7 +6430,6 @@ var _feature = function feature(arg) {
6430
6430
  }
6431
6431
  if (m_visible !== val || direct) {
6432
6432
  m_visible = val;
6433
- m_this.modified();
6434
6433
  if (m_layer && m_layer.visible && !m_layer.visible()) {
6435
6434
  val = false;
6436
6435
  }
@@ -13258,9 +13257,16 @@ var _svgRenderer = function svgRenderer(arg) {
13258
13257
  return m_this;
13259
13258
  };
13260
13259
 
13260
+ /**
13261
+ * Schedule an update in the next render frame.
13262
+ */
13263
+ this._scheduleUpdate = function () {
13264
+ m_this.layer().map().scheduleAnimationFrame(m_this._renderFrame);
13265
+ };
13266
+
13261
13267
  /**
13262
13268
  * Render all features that are marked as needing an update. This should
13263
- * only be called duration an animation frame.
13269
+ * only be called during an animation frame.
13264
13270
  */
13265
13271
  this._renderFrame = function () {
13266
13272
  var id;
@@ -13276,6 +13282,11 @@ var _svgRenderer = function svgRenderer(arg) {
13276
13282
  m_this._renderFeature(id);
13277
13283
  }
13278
13284
  }
13285
+ for (id in m_features) {
13286
+ if (m_features.hasOwnProperty(id) && ids[id] === undefined) {
13287
+ m_this.select(id).attr('visibility', !m_features[id].visible || m_features[id].visible() ? 'visible' : 'hidden');
13288
+ }
13289
+ }
13279
13290
  };
13280
13291
 
13281
13292
  /**
@@ -13290,6 +13301,7 @@ var _svgRenderer = function svgRenderer(arg) {
13290
13301
  if (!m_features[id]) {
13291
13302
  return m_this;
13292
13303
  }
13304
+ m_this.select(id).remove();
13293
13305
  var data = m_features[id].data,
13294
13306
  index = m_features[id].index,
13295
13307
  style = m_features[id].style,
@@ -13309,7 +13321,7 @@ var _svgRenderer = function svgRenderer(arg) {
13309
13321
  rendersel.attr('class', classes.concat([id]).join(' '));
13310
13322
  setStyles(rendersel, style);
13311
13323
  if (visible) {
13312
- rendersel.style('visibility', visible() ? 'visible' : 'hidden');
13324
+ rendersel.attr('visibility', visible() ? 'visible' : 'hidden');
13313
13325
  }
13314
13326
  if (entries.size() && m_features[id].sortByZ) {
13315
13327
  selection.sort(function (a, b) {
@@ -23463,7 +23475,7 @@ module.exports = svg_tileLayer;
23463
23475
  * @constant
23464
23476
  * @type {string}
23465
23477
  */
23466
- module.exports = "1.14.11";
23478
+ module.exports = "1.14.12";
23467
23479
 
23468
23480
  /***/ }),
23469
23481
 
@@ -25780,6 +25792,7 @@ var _svg_object = function svg_object(arg) {
25780
25792
  var m_id = 'svg-' + uniqueID(),
25781
25793
  s_exit = this._exit,
25782
25794
  m_this = this,
25795
+ s_visible = this.visible,
25783
25796
  s_draw = this.draw;
25784
25797
  this._svgid = function () {
25785
25798
  return m_id;
@@ -25814,6 +25827,26 @@ var _svg_object = function svg_object(arg) {
25814
25827
  m_this.renderer()._removeFeature(m_this._svgid());
25815
25828
  s_exit();
25816
25829
  };
25830
+
25831
+ /**
25832
+ * Get/Set the visibility of the feature.
25833
+ *
25834
+ * @param {boolean} [val] A boolean to change the visibility, or `undefined`
25835
+ * to return the visibility.
25836
+ * @param {boolean} [direct] If `true`, when getting the visibility,
25837
+ * disregard the visibility of the parent layer, and when setting, refresh
25838
+ * the state regardless of whether it has changed or not. Otherwise, the
25839
+ * functional visibility is returned, where both the feature and the layer
25840
+ * must be visible for a `true` result.
25841
+ * @returns {boolean|this} Either the visibility (if getting) or the feature
25842
+ * (if setting).
25843
+ */
25844
+ this.visible = function (val, direct) {
25845
+ if (val !== undefined && val !== s_visible(undefined, true) && m_this.renderer()) {
25846
+ m_this.renderer()._scheduleUpdate();
25847
+ }
25848
+ return s_visible(val, direct);
25849
+ };
25817
25850
  return this;
25818
25851
  };
25819
25852
  module.exports = _svg_object;
@@ -61851,12 +61884,6 @@ var _pointFeature = function pointFeature(arg) {
61851
61884
  var d = clusters[cidx];
61852
61885
  // mark the datum as a cluster for accessor methods
61853
61886
  d.__cluster = true;
61854
-
61855
- // store all of the data objects for each point in the cluster as __data
61856
- d.__data = new Array(d.obj.length);
61857
- for (var idx = 0; idx < d.obj.length; idx += 1) {
61858
- d.__data[idx] = m_allData[d.obj[idx].index];
61859
- }
61860
61887
  data[didx] = d;
61861
61888
  }
61862
61889
 
@@ -70094,7 +70121,7 @@ module.exports = "/* quadFeature Color fragment shader */\n\nvarying mediump vec
70094
70121
  * @constant
70095
70122
  * @type {string}
70096
70123
  */
70097
- module.exports = "a43155ff2781340b3078647437dd1d136c744d7f";
70124
+ module.exports = "77d74f3f2551728136c961f0023bcf74e19e6fb0";
70098
70125
 
70099
70126
  /***/ }),
70100
70127