geojs 1.12.4 → 1.12.6

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.
Files changed (47) hide show
  1. package/geo.js +823 -856
  2. package/geo.lean.js +823 -856
  3. package/geo.lean.min.js +3 -3
  4. package/geo.min.js +4 -4
  5. package/package.json +1 -1
  6. package/src/annotation/annotation.js +17 -18
  7. package/src/annotation/circleAnnotation.js +3 -3
  8. package/src/annotation/ellipseAnnotation.js +4 -4
  9. package/src/annotation/lineAnnotation.js +3 -3
  10. package/src/annotation/pointAnnotation.js +3 -4
  11. package/src/annotation/polygonAnnotation.js +2 -3
  12. package/src/annotation/rectangleAnnotation.js +8 -8
  13. package/src/annotation/squareAnnotation.js +3 -3
  14. package/src/annotationLayer.js +4 -4
  15. package/src/choroplethFeature.js +2 -3
  16. package/src/contourFeature.js +2 -3
  17. package/src/feature.js +2 -2
  18. package/src/graphFeature.js +3 -3
  19. package/src/gridFeature.js +2 -3
  20. package/src/heatmapFeature.js +1 -2
  21. package/src/index.js +1 -1
  22. package/src/isolineFeature.js +3 -4
  23. package/src/layer.js +1 -1
  24. package/src/lineFeature.js +1 -3
  25. package/src/map.js +11 -11
  26. package/src/mapInteractor.js +13 -14
  27. package/src/markerFeature.js +2 -4
  28. package/src/meshFeature.js +2 -3
  29. package/src/osmLayer.js +4 -5
  30. package/src/pathFeature.js +1 -2
  31. package/src/pixelmapFeature.js +1 -1
  32. package/src/pixelmapLayer.js +3 -4
  33. package/src/pointFeature.js +2 -4
  34. package/src/polygonFeature.js +1 -2
  35. package/src/quadFeature.js +1 -1
  36. package/src/registry.js +29 -28
  37. package/src/svg/pathFeature.js +1 -2
  38. package/src/textFeature.js +1 -3
  39. package/src/tileLayer.js +5 -4
  40. package/src/trackFeature.js +7 -14
  41. package/src/ui/scaleWidget.js +3 -3
  42. package/src/ui/widget.js +1 -2
  43. package/src/util/clustering.js +1 -1
  44. package/src/util/common.js +38 -1
  45. package/src/util/mesh.js +3 -4
  46. package/src/util/mockVGL.js +1 -2
  47. package/src/vectorFeature.js +1 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geojs",
3
- "version": "1.12.4",
3
+ "version": "1.12.6",
4
4
  "description": "JavaScript Geo Visualization and Analysis Library",
5
5
  "homepage": "https://github.com/OpenGeoscience/geojs",
6
6
  "license": "Apache-2.0",
@@ -1,4 +1,3 @@
1
- var $ = require('jquery');
2
1
  var geo_event = require('../event');
3
2
  var geo_action = require('../action');
4
3
  var transform = require('../transform');
@@ -101,7 +100,7 @@ var annotation = function (type, args) {
101
100
  }
102
101
 
103
102
  var m_this = this,
104
- m_options = $.extend(true, {}, this.constructor.defaults, args || {}),
103
+ m_options = util.deepMerge({}, this.constructor.defaults, args || {}),
105
104
  m_id = m_options.annotationId;
106
105
  delete m_options.annotationId;
107
106
  if (m_id === undefined || (m_options.layer && m_options.layer.annotationById(m_id))) {
@@ -526,14 +525,14 @@ var annotation = function (type, args) {
526
525
  var coordinatesSet;
527
526
  if (arg2 === undefined) {
528
527
  coordinatesSet = arg1[m_this._coordinateOption] !== undefined;
529
- m_options = $.extend(true, m_options, arg1);
528
+ m_options = util.deepMerge(m_options, arg1);
530
529
  /* For style objects, re-extend them without recursion. This allows
531
530
  * setting colors without an opacity field, for instance. */
532
531
  ['style', 'createStyle', 'editStyle', 'editHandleStyle', 'labelStyle',
533
532
  'highlightStyle', 'cursorStyle'
534
533
  ].forEach(function (key) {
535
534
  if (arg1[key] !== undefined) {
536
- $.extend(m_options[key], arg1[key]);
535
+ Object.assign(m_options[key], arg1[key]);
537
536
  }
538
537
  });
539
538
  } else {
@@ -596,7 +595,7 @@ var annotation = function (type, args) {
596
595
  m_options[styleType] = {};
597
596
  }
598
597
  if (arg2 === undefined) {
599
- m_options[styleType] = $.extend(true, m_options[styleType], arg1);
598
+ m_options[styleType] = util.deepMerge(m_options[styleType], arg1);
600
599
  } else {
601
600
  m_options[styleType][arg1] = arg2;
602
601
  }
@@ -659,15 +658,15 @@ var annotation = function (type, args) {
659
658
  /* for some states, fall back to the general style if they don't specify a
660
659
  * value explicitly. */
661
660
  if (state === annotationState.edit || state === annotationState.highlight) {
662
- return $.extend({}, m_options.style, m_options[state + 'Style']);
661
+ return Object.assign({}, m_options.style, m_options[state + 'Style']);
663
662
  }
664
663
  if (state === annotationState.create) {
665
- return $.extend({}, m_options.style, m_options.editStyle,
666
- m_options[state + 'Style']);
664
+ return Object.assign({}, m_options.style, m_options.editStyle,
665
+ m_options[state + 'Style']);
667
666
  }
668
667
  if (state === annotationState.cursor) {
669
- return $.extend({}, m_options.style, m_options.editStyle,
670
- m_options.createStyle, m_options[state + 'Style']);
668
+ return Object.assign({}, m_options.style, m_options.editStyle,
669
+ m_options.createStyle, m_options[state + 'Style']);
671
670
  }
672
671
  return m_options[state + 'Style'] || m_options.style || {};
673
672
  };
@@ -925,7 +924,7 @@ var annotation = function (type, args) {
925
924
  */
926
925
  this._addEditHandles = function (features, vertices, opts, isOpen) {
927
926
  var editPoints,
928
- style = $.extend({}, defaultEditHandleStyle, m_this.editHandleStyle()),
927
+ style = Object.assign({}, defaultEditHandleStyle, m_this.editHandleStyle()),
929
928
  handles = util.ensureFunction(style.handles)() || {},
930
929
  selected = (
931
930
  m_this._editHandle && m_this._editHandle.handle &&
@@ -933,7 +932,7 @@ var annotation = function (type, args) {
933
932
  m_this._editHandle.handle : undefined);
934
933
  /* opts specify which handles are allowed. They must be allowed by the
935
934
  * original opts object and by the editHandleStyle.handle object. */
936
- opts = $.extend({}, opts);
935
+ opts = Object.assign({}, opts);
937
936
  Object.keys(handles).forEach(function (key) {
938
937
  if (handles[key] === false) {
939
938
  opts[key] = false;
@@ -947,16 +946,16 @@ var annotation = function (type, args) {
947
946
  vertexList.forEach((vert, vidx) => {
948
947
  vert.forEach(function (pt, idx) {
949
948
  if (opts.vertex !== false) {
950
- editPoints.push($.extend({}, pt, {type: 'vertex', index: idx, vindex: vidx, style: style, editHandle: true}));
949
+ editPoints.push(Object.assign({}, pt, {type: 'vertex', index: idx, vindex: vidx, style: style, editHandle: true}));
951
950
  }
952
951
  if (opts.edge !== false && idx !== vert.length - 1 && (pt.x !== vert[idx + 1].x || pt.y !== vert[idx + 1].y)) {
953
- editPoints.push($.extend({
952
+ editPoints.push(Object.assign({
954
953
  x: (pt.x + vert[idx + 1].x) / 2,
955
954
  y: (pt.y + vert[idx + 1].y) / 2
956
955
  }, {type: 'edge', index: idx, vindex: vidx, style: style, editHandle: true}));
957
956
  }
958
957
  if (opts.edge !== false && !isOpen && idx === vert.length - 1 && (pt.x !== vert[0].x || pt.y !== vert[0].y)) {
959
- editPoints.push($.extend({
958
+ editPoints.push(Object.assign({
960
959
  x: (pt.x + vert[0].x) / 2,
961
960
  y: (pt.y + vert[0].y) / 2
962
961
  }, {type: 'edge', index: idx, vindex: vidx, style: style, editHandle: true}));
@@ -964,10 +963,10 @@ var annotation = function (type, args) {
964
963
  });
965
964
  });
966
965
  if (opts.center !== false) {
967
- editPoints.push($.extend({}, util.centerFromPerimeter(m_this._coordinates()), {type: 'center', style: style, editHandle: true}));
966
+ editPoints.push(Object.assign({}, util.centerFromPerimeter(m_this._coordinates()), {type: 'center', style: style, editHandle: true}));
968
967
  }
969
968
  if (opts.rotate !== false) {
970
- editPoints.push($.extend(m_this._rotateHandlePosition(
969
+ editPoints.push(Object.assign(m_this._rotateHandlePosition(
971
970
  style.rotateHandleOffset,
972
971
  style.rotateHandleRotation + (selected && selected.type === 'rotate' ? m_this._editHandle.amountRotated : 0)
973
972
  ), {type: 'rotate', style: style, editHandle: true}));
@@ -976,7 +975,7 @@ var annotation = function (type, args) {
976
975
  }
977
976
  }
978
977
  if (opts.resize !== false) {
979
- editPoints.push($.extend(m_this._rotateHandlePosition(
978
+ editPoints.push(Object.assign(m_this._rotateHandlePosition(
980
979
  style.resizeHandleOffset,
981
980
  style.resizeHandleRotation
982
981
  ), {type: 'resize', style: style, editHandle: true}));
@@ -1,7 +1,7 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const registerAnnotation = require('../registry').registerAnnotation;
4
3
  const markerFeature = require('../markerFeature');
4
+ const util = require('../util');
5
5
 
6
6
  const ellipseAnnotation = require('./ellipseAnnotation');
7
7
 
@@ -22,7 +22,7 @@ var circleAnnotation = function (args, annotationName) {
22
22
  if (!(this instanceof circleAnnotation)) {
23
23
  return new circleAnnotation(args, annotationName);
24
24
  }
25
- args = $.extend(true, {}, this.constructor.defaults, args, {constraint: 1});
25
+ args = util.deepMerge({}, this.constructor.defaults, args, {constraint: 1});
26
26
  ellipseAnnotation.call(this, args, annotationName || 'circle');
27
27
  };
28
28
  inherit(circleAnnotation, ellipseAnnotation);
@@ -30,7 +30,7 @@ inherit(circleAnnotation, ellipseAnnotation);
30
30
  /**
31
31
  * This object contains the default options to initialize the class.
32
32
  */
33
- circleAnnotation.defaults = $.extend({}, ellipseAnnotation.defaults, {
33
+ circleAnnotation.defaults = Object.assign({}, ellipseAnnotation.defaults, {
34
34
  });
35
35
 
36
36
  var circleRequiredFeatures = {};
@@ -1,7 +1,7 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const registerAnnotation = require('../registry').registerAnnotation;
4
3
  const markerFeature = require('../markerFeature');
4
+ const util = require('../util');
5
5
 
6
6
  const annotationState = require('./annotation').state;
7
7
  const rectangleAnnotation = require('./rectangleAnnotation');
@@ -23,7 +23,7 @@ var ellipseAnnotation = function (args, annotationName) {
23
23
  if (!(this instanceof ellipseAnnotation)) {
24
24
  return new ellipseAnnotation(args, annotationName);
25
25
  }
26
- args = $.extend(true, {}, this.constructor.defaults, args);
26
+ args = util.deepMerge({}, this.constructor.defaults, args);
27
27
  rectangleAnnotation.call(this, args, annotationName || 'ellipse');
28
28
 
29
29
  var m_this = this;
@@ -49,7 +49,7 @@ var ellipseAnnotation = function (args, annotationName) {
49
49
  marker: {
50
50
  x: (opt.corners[0].x + opt.corners[1].x + opt.corners[2].x + opt.corners[3].x) / 4,
51
51
  y: (opt.corners[0].y + opt.corners[1].y + opt.corners[2].y + opt.corners[3].y) / 4,
52
- style: $.extend(
52
+ style: Object.assign(
53
53
  {}, style,
54
54
  {
55
55
  radius: radius,
@@ -120,7 +120,7 @@ inherit(ellipseAnnotation, rectangleAnnotation);
120
120
  /**
121
121
  * This object contains the default options to initialize the class.
122
122
  */
123
- ellipseAnnotation.defaults = $.extend({}, rectangleAnnotation.defaults, {
123
+ ellipseAnnotation.defaults = Object.assign({}, rectangleAnnotation.defaults, {
124
124
  });
125
125
 
126
126
  var ellipseRequiredFeatures = {};
@@ -1,7 +1,7 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const registerAnnotation = require('../registry').registerAnnotation;
4
3
  const lineFeature = require('../lineFeature');
4
+ const util = require('../util');
5
5
 
6
6
  const annotation = require('./annotation').annotation;
7
7
  const annotationState = require('./annotation').state;
@@ -37,7 +37,7 @@ var lineAnnotation = function (args) {
37
37
  if (!(this instanceof lineAnnotation)) {
38
38
  return new lineAnnotation(args);
39
39
  }
40
- args = $.extend(true, {}, this.constructor.defaults, {
40
+ args = util.deepMerge({}, this.constructor.defaults, {
41
41
  style: {
42
42
  line: function (d) {
43
43
  /* Return an array that has the same number of items as we have
@@ -324,7 +324,7 @@ inherit(lineAnnotation, annotation);
324
324
  /**
325
325
  * This object contains the default options to initialize the class.
326
326
  */
327
- lineAnnotation.defaults = $.extend({}, annotation.defaults, {
327
+ lineAnnotation.defaults = Object.assign({}, annotation.defaults, {
328
328
  style: {
329
329
  strokeColor: {r: 0, g: 0, b: 0},
330
330
  strokeOpacity: 1,
@@ -1,4 +1,3 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const util = require('../util');
4
3
  const registerAnnotation = require('../registry').registerAnnotation;
@@ -40,7 +39,7 @@ var pointAnnotation = function (args) {
40
39
  return new pointAnnotation(args);
41
40
  }
42
41
 
43
- args = $.extend(true, {}, this.constructor.defaults, args);
42
+ args = util.deepMerge({}, this.constructor.defaults, args);
44
43
  args.position = args.position || (args.coordinates ? args.coordinates[0] : undefined);
45
44
  delete args.coordinates;
46
45
  annotation.call(this, 'point', args);
@@ -66,7 +65,7 @@ var pointAnnotation = function (args) {
66
65
  if (opt.style.scaled === true) {
67
66
  opt.style.scaled = m_this.layer().map().zoom();
68
67
  }
69
- style = $.extend({}, style, {
68
+ style = Object.assign({}, style, {
70
69
  radius: function () {
71
70
  var radius = opt.style.radius,
72
71
  zoom = m_this.layer().map().zoom();
@@ -182,7 +181,7 @@ inherit(pointAnnotation, annotation);
182
181
  /**
183
182
  * This object contains the default options to initialize the class.
184
183
  */
185
- pointAnnotation.defaults = $.extend({}, annotation.defaults, {
184
+ pointAnnotation.defaults = Object.assign({}, annotation.defaults, {
186
185
  style: {
187
186
  fill: true,
188
187
  fillColor: {r: 0, g: 1, b: 0},
@@ -1,4 +1,3 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const registerAnnotation = require('../registry').registerAnnotation;
4
3
  const lineFeature = require('../lineFeature');
@@ -44,7 +43,7 @@ var polygonAnnotation = function (args) {
44
43
  return new polygonAnnotation(args);
45
44
  }
46
45
 
47
- args = $.extend(true, {}, this.constructor.defaults, {
46
+ args = util.deepMerge({}, this.constructor.defaults, {
48
47
  style: {
49
48
  polygon: function (d) { return d.polygon; }
50
49
  },
@@ -354,7 +353,7 @@ inherit(polygonAnnotation, annotation);
354
353
  /**
355
354
  * This object contains the default options to initialize the class.
356
355
  */
357
- polygonAnnotation.defaults = $.extend({}, annotation.defaults, {
356
+ polygonAnnotation.defaults = Object.assign({}, annotation.defaults, {
358
357
  style: {
359
358
  fill: true,
360
359
  fillColor: {r: 0, g: 1, b: 0},
@@ -1,9 +1,9 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const geo_event = require('../event');
4
3
  const geo_action = require('../action');
5
4
  const registerAnnotation = require('../registry').registerAnnotation;
6
5
  const polygonFeature = require('../polygonFeature');
6
+ const util = require('../util');
7
7
 
8
8
  const annotation = require('./annotation').annotation;
9
9
  const annotationState = require('./annotation').state;
@@ -48,7 +48,7 @@ var rectangleAnnotation = function (args, annotationName) {
48
48
  return new rectangleAnnotation(args, annotationName);
49
49
  }
50
50
 
51
- args = $.extend(true, {}, this.constructor.defaults, args);
51
+ args = util.deepMerge({}, this.constructor.defaults, args);
52
52
  args.corners = args.corners || args.coordinates || [];
53
53
  delete args.coordinates;
54
54
  annotation.call(this, annotationName || 'rectangle', args);
@@ -230,7 +230,7 @@ var rectangleAnnotation = function (args, annotationName) {
230
230
  c2 = map.gcsToDisplay(evt.mapgcs, null),
231
231
  c1 = {x: c2.x, y: c0.y},
232
232
  c3 = {x: c0.x, y: c2.y};
233
- corners[2] = $.extend({}, evt.mapgcs);
233
+ corners[2] = Object.assign({}, evt.mapgcs);
234
234
  corners[1] = map.displayToGcs(c1, null);
235
235
  corners[3] = map.displayToGcs(c3, null);
236
236
  if (this._selectionConstraint) {
@@ -290,10 +290,10 @@ var rectangleAnnotation = function (args, annotationName) {
290
290
  return 'done';
291
291
  }
292
292
  if (evt.buttonsDown.left) {
293
- corners.push($.extend({}, evt.mapgcs));
294
- corners.push($.extend({}, evt.mapgcs));
295
- corners.push($.extend({}, evt.mapgcs));
296
- corners.push($.extend({}, evt.mapgcs));
293
+ corners.push(Object.assign({}, evt.mapgcs));
294
+ corners.push(Object.assign({}, evt.mapgcs));
295
+ corners.push(Object.assign({}, evt.mapgcs));
296
+ corners.push(Object.assign({}, evt.mapgcs));
297
297
  return true;
298
298
  }
299
299
  };
@@ -388,7 +388,7 @@ inherit(rectangleAnnotation, annotation);
388
388
  /**
389
389
  * This object contains the default options to initialize the class.
390
390
  */
391
- rectangleAnnotation.defaults = $.extend({}, annotation.defaults, {
391
+ rectangleAnnotation.defaults = Object.assign({}, annotation.defaults, {
392
392
  style: {
393
393
  fill: true,
394
394
  fillColor: {r: 0, g: 1, b: 0},
@@ -1,7 +1,7 @@
1
- const $ = require('jquery');
2
1
  const inherit = require('../inherit');
3
2
  const registerAnnotation = require('../registry').registerAnnotation;
4
3
  const polygonFeature = require('../polygonFeature');
4
+ const util = require('../util');
5
5
 
6
6
  const rectangleAnnotation = require('./rectangleAnnotation');
7
7
 
@@ -22,7 +22,7 @@ var squareAnnotation = function (args, annotationName) {
22
22
  if (!(this instanceof squareAnnotation)) {
23
23
  return new squareAnnotation(args, annotationName);
24
24
  }
25
- args = $.extend(true, {}, this.constructor.defaults, args, {constraint: 1});
25
+ args = util.deepMerge({}, this.constructor.defaults, args, {constraint: 1});
26
26
  rectangleAnnotation.call(this, args, annotationName || 'square');
27
27
  };
28
28
  inherit(squareAnnotation, rectangleAnnotation);
@@ -30,7 +30,7 @@ inherit(squareAnnotation, rectangleAnnotation);
30
30
  /**
31
31
  * This object contains the default options to initialize the class.
32
32
  */
33
- squareAnnotation.defaults = $.extend({}, rectangleAnnotation.defaults, {
33
+ squareAnnotation.defaults = Object.assign({}, rectangleAnnotation.defaults, {
34
34
  });
35
35
 
36
36
  var squareRequiredFeatures = {};
@@ -140,7 +140,7 @@ var annotationLayer = function (arg) {
140
140
  };
141
141
  });
142
142
 
143
- m_options = $.extend(true, {}, {
143
+ m_options = util.deepMerge({}, {
144
144
  dblClickTime: 300,
145
145
  adjacentPointProximity: 5, // in pixels, 0 is exact
146
146
  // in pixels; set to continuousPointProximity to false to disable
@@ -445,7 +445,7 @@ var annotationLayer = function (arg) {
445
445
  return m_options[arg1];
446
446
  }
447
447
  if (arg2 === undefined) {
448
- m_options = $.extend(true, m_options, arg1);
448
+ m_options = util.deepMerge(m_options, arg1);
449
449
  } else {
450
450
  m_options[arg1] = arg2;
451
451
  }
@@ -696,7 +696,7 @@ var annotationLayer = function (arg) {
696
696
  m_this.map().interactor().removeAction(
697
697
  undefined, undefined, geo_annotation.actionOwner);
698
698
  if (createAnnotation) {
699
- options = $.extend({}, options || {}, {
699
+ options = Object.assign({}, options || {}, {
700
700
  state: geo_annotation.state.create,
701
701
  layer: m_this
702
702
  });
@@ -812,7 +812,7 @@ var annotationLayer = function (arg) {
812
812
  gcs === undefined ? map.ingcs() : gcs));
813
813
  $.each(dataList, function (data_idx, data) {
814
814
  var type = (data.properties || {}).annotationType || feature.featureType,
815
- options = $.extend({}, data.properties || {}),
815
+ options = Object.assign({}, data.properties || {}),
816
816
  position, datagcs, i, existing;
817
817
  if ($.inArray(type, annotationList) < 0) {
818
818
  return;
@@ -34,7 +34,6 @@ var choroplethFeature = function (arg) {
34
34
  arg = arg || {};
35
35
  feature.call(this, arg);
36
36
 
37
- var $ = require('jquery');
38
37
  var ensureFunction = require('./util').ensureFunction;
39
38
 
40
39
  delete arg.layer;
@@ -45,7 +44,7 @@ var choroplethFeature = function (arg) {
45
44
  var d3 = require('./svg/svgRenderer').d3,
46
45
  m_this = this,
47
46
  s_init = this._init,
48
- m_choropleth = $.extend(
47
+ m_choropleth = Object.assign(
49
48
  {},
50
49
  {
51
50
  colorRange: [
@@ -142,7 +141,7 @@ var choroplethFeature = function (arg) {
142
141
  return m_choropleth[arg1];
143
142
  }
144
143
  if (arg2 === undefined) {
145
- choropleth = $.extend(
144
+ choropleth = Object.assign(
146
145
  {},
147
146
  m_choropleth,
148
147
  arg1
@@ -94,7 +94,6 @@ var contourFeature = function (arg) {
94
94
  return new contourFeature(arg);
95
95
  }
96
96
 
97
- var $ = require('jquery');
98
97
  var util = require('./util');
99
98
  var meshUtil = require('./util/mesh');
100
99
 
@@ -129,7 +128,7 @@ var contourFeature = function (arg) {
129
128
  this._init = function (arg) {
130
129
  s_init.call(m_this, arg);
131
130
 
132
- var defaultStyle = $.extend(
131
+ var defaultStyle = Object.assign(
133
132
  {},
134
133
  {
135
134
  opacity: 1.0,
@@ -144,7 +143,7 @@ var contourFeature = function (arg) {
144
143
 
145
144
  m_this.style(defaultStyle);
146
145
 
147
- m_this.contour($.extend({}, {
146
+ m_this.contour(Object.assign({}, {
148
147
  minColor: 'black',
149
148
  minOpacity: 0,
150
149
  maxColor: 'black',
package/src/feature.js CHANGED
@@ -540,7 +540,7 @@ var feature = function (arg) {
540
540
  } else if (typeof arg1 === 'string' && arg2 === undefined) {
541
541
  return m_style[arg1];
542
542
  } else if (arg2 === undefined) {
543
- m_style = $.extend({}, m_style, arg1);
543
+ m_style = Object.assign({}, m_style, arg1);
544
544
  m_this.modified();
545
545
  return m_this;
546
546
  } else {
@@ -936,7 +936,7 @@ var feature = function (arg) {
936
936
  if (!m_layer) {
937
937
  throw new Error('Feature requires a valid layer');
938
938
  }
939
- m_style = $.extend(
939
+ m_style = Object.assign(
940
940
  {},
941
941
  {opacity: 1.0},
942
942
  arg.style === undefined ? {} : arg.style);
@@ -39,7 +39,6 @@ var graphFeature = function (arg) {
39
39
  arg = arg || {};
40
40
  feature.call(this, arg);
41
41
 
42
- var $ = require('jquery');
43
42
  var util = require('./util');
44
43
  var registry = require('./registry');
45
44
 
@@ -64,8 +63,9 @@ var graphFeature = function (arg) {
64
63
  this._init = function (arg) {
65
64
  s_init.call(m_this, arg);
66
65
 
67
- var defaultStyle = $.extend(
68
- true, {}, {
66
+ var defaultStyle = util.deepMerge(
67
+ {},
68
+ {
69
69
  nodes: {
70
70
  radius: 5.0,
71
71
  fill: true,
@@ -93,7 +93,6 @@ var gridFeature = function (arg) {
93
93
  return new gridFeature(arg);
94
94
  }
95
95
 
96
- var $ = require('jquery');
97
96
  var util = require('./util');
98
97
  var meshUtil = require('./util/mesh');
99
98
 
@@ -128,7 +127,7 @@ var gridFeature = function (arg) {
128
127
  this._init = function (arg) {
129
128
  s_init.call(m_this, arg);
130
129
 
131
- var defaultStyle = $.extend(
130
+ var defaultStyle = Object.assign(
132
131
  {},
133
132
  {
134
133
  opacity: 1.0,
@@ -143,7 +142,7 @@ var gridFeature = function (arg) {
143
142
 
144
143
  m_this.style(defaultStyle);
145
144
 
146
- m_this.grid($.extend({}, {
145
+ m_this.grid(Object.assign({}, {
147
146
  minColor: 'black',
148
147
  minOpacity: 0,
149
148
  maxColor: 'black',
@@ -1,4 +1,3 @@
1
- var $ = require('jquery');
2
1
  var inherit = require('./inherit');
3
2
  var feature = require('./feature');
4
3
  var transform = require('./transform');
@@ -233,7 +232,7 @@ var heatmapFeature = function (arg) {
233
232
  this._init = function (arg) {
234
233
  s_init.call(m_this, arg);
235
234
 
236
- var defaultStyle = $.extend(
235
+ var defaultStyle = Object.assign(
237
236
  {},
238
237
  {
239
238
  radius: 10,
package/src/index.js CHANGED
@@ -41,7 +41,7 @@ $.htmlPrefilter = function (html) {
41
41
 
42
42
  require('./main.styl');
43
43
 
44
- module.exports = $.extend({
44
+ module.exports = Object.assign({
45
45
  annotationLayer: require('./annotationLayer'),
46
46
  camera: require('./camera'),
47
47
  choroplethFeature: require('./choroplethFeature'),
@@ -190,7 +190,6 @@ var isolineFeature = function (arg) {
190
190
  return new isolineFeature(arg);
191
191
  }
192
192
 
193
- var $ = require('jquery');
194
193
  var transform = require('./transform');
195
194
  var geo_event = require('./event');
196
195
  var textFeature = require('./textFeature');
@@ -646,7 +645,7 @@ var isolineFeature = function (arg) {
646
645
  * properties if there are no labels.
647
646
  */
648
647
  this.lastLabelPositions = function () {
649
- return $.extend({}, m_lastLabelPositions);
648
+ return Object.assign({}, m_lastLabelPositions);
650
649
  };
651
650
 
652
651
  /**
@@ -816,7 +815,7 @@ var isolineFeature = function (arg) {
816
815
  arg = arg || {};
817
816
  s_init.call(m_this, arg);
818
817
 
819
- var defaultStyle = $.extend(
818
+ var defaultStyle = Object.assign(
820
819
  {},
821
820
  {
822
821
  opacity: 1.0,
@@ -836,7 +835,7 @@ var isolineFeature = function (arg) {
836
835
 
837
836
  m_this.style(defaultStyle);
838
837
 
839
- m_this.isoline($.extend({}, {
838
+ m_this.isoline(Object.assign({}, {
840
839
  count: 15,
841
840
  autofit: true,
842
841
  levels: [5, 5],
package/src/layer.js CHANGED
@@ -517,7 +517,7 @@ var layer = function (arg) {
517
517
  m_map.node().append(m_node);
518
518
 
519
519
  /* Pass along the arguments, but not the map reference */
520
- var options = $.extend({}, arg);
520
+ var options = Object.assign({}, arg);
521
521
  delete options.map;
522
522
 
523
523
  if (m_renderer) {
@@ -79,8 +79,6 @@ var lineFeature = function (arg) {
79
79
  return new lineFeature(arg);
80
80
  }
81
81
 
82
- var $ = require('jquery');
83
-
84
82
  arg = arg || {};
85
83
  feature.call(this, arg);
86
84
 
@@ -475,7 +473,7 @@ var lineFeature = function (arg) {
475
473
  arg = arg || {};
476
474
  s_init.call(m_this, arg);
477
475
 
478
- var defaultStyle = $.extend(
476
+ var defaultStyle = Object.assign(
479
477
  {},
480
478
  {
481
479
  strokeWidth: 1.0,