geojs 1.8.0 → 1.8.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": "geojs",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "JavaScript Geo Visualization and Analysis Library",
5
5
  "homepage": "https://github.com/OpenGeoscience/geojs",
6
6
  "license": "Apache-2.0",
@@ -41,6 +41,12 @@ var pixelmapLayer = function (arg) {
41
41
  return new pixelmapLayer(arg);
42
42
  }
43
43
  arg = arg || {};
44
+ /* Don't extend data from args -- it can be very slow */
45
+ let argdata;
46
+ if (arg.data) {
47
+ argdata = arg.data;
48
+ delete arg.data;
49
+ }
44
50
  arg = $.extend(
45
51
  true,
46
52
  {},
@@ -99,8 +105,8 @@ var pixelmapLayer = function (arg) {
99
105
  pixelmapArgs.color = arg.color;
100
106
  }
101
107
  m_pixelmapFeature = m_this.createFeature('pixelmap', pixelmapArgs);
102
- if (arg.data) {
103
- m_pixelmapFeature.data(arg.data);
108
+ if (argdata) {
109
+ m_pixelmapFeature.data(argdata);
104
110
  }
105
111
  m_this.style = m_pixelmapFeature.style;
106
112
  m_this.data = m_pixelmapFeature.data;
package/src/registry.js CHANGED
@@ -313,7 +313,12 @@ util.createLayer = function (name, map, arg) {
313
313
  options.features = layerDefaultFeatures[name];
314
314
  }
315
315
  if (arg !== undefined) {
316
+ const argdata = arg.data;
317
+ delete arg.data;
316
318
  $.extend(true, options, arg);
319
+ if (argdata) {
320
+ options.data = argdata;
321
+ }
317
322
  }
318
323
  layer = layers[name](options);
319
324
  layer.layerName = name;