geojs 1.10.14 → 1.10.16

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.
@@ -107,13 +107,15 @@ jobs:
107
107
  - uses: actions/checkout@v3
108
108
  - uses: actions/setup-node@v3
109
109
  with:
110
- node-version: '16'
110
+ node-version: 'lts/*'
111
111
  - run: npm ci
112
112
  - name: Import artifacts
113
113
  uses: actions/download-artifact@v3
114
114
  with:
115
115
  name: dist
116
116
  path: dist
117
+ - name: Install semantic-release
118
+ run: npm install semantic-release --no-save
117
119
  - name: Release
118
120
  env:
119
121
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/geo.js CHANGED
@@ -8351,6 +8351,28 @@ geo_event.mousemove = 'geo_mousemove';
8351
8351
  */
8352
8352
  geo_event.mouseclick = 'geo_mouseclick';
8353
8353
 
8354
+ /**
8355
+ * Triggered on `mouseup` events. The event object extends
8356
+ * {@link geo.mouseState}.
8357
+ *
8358
+ * @event geo.event.mouseup
8359
+ * @type {(geo.event.base|geo.mouseState)}
8360
+ * @property {geo.mouseButtons} buttonsDown The buttons that were down at the
8361
+ * start of the up action.
8362
+ */
8363
+ geo_event.mouseup = 'geo_mouseup';
8364
+
8365
+ /**
8366
+ * Triggered on `mousedown` events. The event object extends
8367
+ * {@link geo.mouseState}.
8368
+ *
8369
+ * @event geo.event.mousedown
8370
+ * @type {(geo.event.base|geo.mouseState)}
8371
+ * @property {geo.mouseButtons} buttonsDown The buttons that were down at the
8372
+ * end of the down action.
8373
+ */
8374
+ geo_event.mousedown = 'geo_mousedown';
8375
+
8354
8376
  /**
8355
8377
  * Triggered on every `mousemove` during a brushing selection.
8356
8378
  * The event object extends {@link geo.brushSelection}.
@@ -8673,6 +8695,41 @@ geo_event.feature = {
8673
8695
  * @property {geo.event} sourceEvent The underlying event that trigger this.
8674
8696
  */
8675
8697
  mouseclick_order: 'geo_feature_mouseclick_order',
8698
+ /**
8699
+ * The event is the feature version of {@link geo.event.mousedown}.
8700
+ *
8701
+ * @event geo.event.feature.mousedown
8702
+ * @type {geo.event.base}
8703
+ * @property {object} data The feature data the mouse is above.
8704
+ * @property {number} index The index of the feature data the mouse is above.
8705
+ * @property {object} extra Extra information about the feature and mouse
8706
+ * location.
8707
+ * @property {geo.mouseState} mouse The mouse state.
8708
+ * @property {number} eventID a monotonically increasing event number. All
8709
+ * features that the mouse goes down on simultaneously will have the same
8710
+ * `eventID`.
8711
+ * @property {boolean} top True if this is the topmost data element.
8712
+ * @property {geo.event} sourceEvent The underlying event that trigger this.
8713
+ */
8714
+ mousedown: 'geo_feature_mousedown',
8715
+ /**
8716
+ * The event is the feature version of {@link geo.event.mouseup}.
8717
+ *
8718
+ * @event geo.event.feature.mouseup
8719
+ * @type {geo.event.base}
8720
+ * @property {object} data The feature data the mouse is above.
8721
+ * @property {number} index The index of the feature data the mouse is above.
8722
+ * @property {object} extra Extra information about the feature and mouse
8723
+ * location.
8724
+ * @property {geo.mouseState} mouse The mouse state. The buttons are before
8725
+ * the up action occurs.
8726
+ * @property {number} eventID a monotonically increasing event number. All
8727
+ * features that the mouse goes up on simultaneously will have the same
8728
+ * `eventID`.
8729
+ * @property {boolean} top True if this is the topmost data element.
8730
+ * @property {geo.event} sourceEvent The underlying event that trigger this.
8731
+ */
8732
+ mouseup: 'geo_feature_mouseup',
8676
8733
  /**
8677
8734
  * This event is fired for each data component of a feature under a brush
8678
8735
  * that has just finished its selection.
@@ -9091,6 +9148,8 @@ var feature = function feature(arg) {
9091
9148
  // First unbind to be sure that the handlers aren't bound twice.
9092
9149
  m_this._unbindMouseHandlers();
9093
9150
  m_this.geoOn(geo_event.mousemove, m_this._handleMousemove);
9151
+ m_this.geoOn(geo_event.mousedown, m_this._handleMousedown);
9152
+ m_this.geoOn(geo_event.mouseup, m_this._handleMouseup);
9094
9153
  m_this.geoOn(geo_event.mouseclick, m_this._handleMouseclick);
9095
9154
  m_this.geoOn(geo_event.brushend, m_this._handleBrushend);
9096
9155
  m_this.geoOn(geo_event.brush, m_this._handleBrush);
@@ -9101,6 +9160,8 @@ var feature = function feature(arg) {
9101
9160
  */
9102
9161
  this._unbindMouseHandlers = function () {
9103
9162
  m_this.geoOff(geo_event.mousemove, m_this._handleMousemove);
9163
+ m_this.geoOff(geo_event.mousedown, m_this._handleMousedown);
9164
+ m_this.geoOff(geo_event.mouseup, m_this._handleMouseup);
9104
9165
  m_this.geoOff(geo_event.mouseclick, m_this._handleMouseclick);
9105
9166
  m_this.geoOff(geo_event.brushend, m_this._handleBrushend);
9106
9167
  m_this.geoOff(geo_event.brush, m_this._handleBrush);
@@ -9171,20 +9232,46 @@ var feature = function feature(arg) {
9171
9232
  };
9172
9233
  };
9173
9234
 
9235
+ /**
9236
+ * Private mousedown handler. This uses `pointSearch` to determine which
9237
+ * features the mouse is over, then fires appropriate events.
9238
+ *
9239
+ * @param {geo.event} evt The event that triggered this handler.
9240
+ * @fires geo.event.feature.mousedown
9241
+ */
9242
+ this._handleMousedown = function (evt) {
9243
+ this._handleMousemove(evt, geo_event.feature.mousedown);
9244
+ };
9245
+
9246
+ /**
9247
+ * Private mouseup handler. This uses `pointSearch` to determine which
9248
+ * features the mouse is over, then fires appropriate events.
9249
+ *
9250
+ * @param {geo.event} evt The event that triggered this handler.
9251
+ * @fires geo.event.feature.mouseup
9252
+ */
9253
+ this._handleMouseup = function (evt) {
9254
+ this._handleMousemove(evt, geo_event.feature.mouseup);
9255
+ };
9256
+
9174
9257
  /**
9175
9258
  * Private mousemove handler. This uses `pointSearch` to determine which
9176
9259
  * features the mouse is over, then fires appropriate events.
9177
9260
  *
9178
9261
  * @param {geo.event} evt The event that triggered this handler.
9262
+ * @param {string} [updown] If "mouseup" or "mousedown", fire that event
9263
+ * instead of mouseon.
9179
9264
  * @fires geo.event.feature.mouseover_order
9180
9265
  * @fires geo.event.feature.mouseover
9181
9266
  * @fires geo.event.feature.mouseout
9182
9267
  * @fires geo.event.feature.mousemove
9183
9268
  * @fires geo.event.feature.mouseoff
9184
9269
  * @fires geo.event.feature.mouseon
9270
+ * @fires geo.event.feature.mouseup
9271
+ * @fires geo.event.feature.mousedown
9185
9272
  */
9186
- this._handleMousemove = function (evt) {
9187
- var mouse = m_this.layer().map().interactor().mouse(),
9273
+ this._handleMousemove = function (evt, updown) {
9274
+ var mouse = evt && evt.mouse ? evt.mouse : m_this.layer().map().interactor().mouse(),
9188
9275
  data = m_this.data(),
9189
9276
  over = m_this.pointSearch(mouse.geo),
9190
9277
  newFeatures = [],
@@ -9212,6 +9299,21 @@ var feature = function feature(arg) {
9212
9299
  sourceEvent: evt
9213
9300
  });
9214
9301
  }
9302
+ feature.eventID += 1;
9303
+ if (updown) {
9304
+ over.index.forEach(function (i, idx) {
9305
+ m_this.geoTrigger(updown, {
9306
+ data: data[i],
9307
+ index: i,
9308
+ extra: extra[i],
9309
+ mouse: mouse,
9310
+ eventID: feature.eventID,
9311
+ top: idx === over.length - 1,
9312
+ sourceEvent: evt
9313
+ }, true);
9314
+ });
9315
+ return;
9316
+ }
9215
9317
 
9216
9318
  // Get the index of the element that was previously on top
9217
9319
  if (m_selectedFeatures.length) {
@@ -9225,7 +9327,7 @@ var feature = function feature(arg) {
9225
9327
  oldFeatures = m_selectedFeatures.filter(function (i) {
9226
9328
  return over.index.indexOf(i) < 0;
9227
9329
  });
9228
- feature.eventID += 1;
9330
+
9229
9331
  // Fire events for mouse in first.
9230
9332
  newFeatures.forEach(function (i, idx) {
9231
9333
  m_this.geoTrigger(geo_event.feature.mouseover, {
@@ -18280,6 +18382,7 @@ var mapInteractor = function mapInteractor(args) {
18280
18382
  * @param {jQuery.Event} evt The event that triggered this.
18281
18383
  * @fires geo.event.brushstart
18282
18384
  * @fires geo.event.actiondown
18385
+ * @fires geo.event.mousedown
18283
18386
  */
18284
18387
  this._handleMouseDown = function (evt) {
18285
18388
  var action, actionRecord;
@@ -18295,6 +18398,7 @@ var mapInteractor = function mapInteractor(args) {
18295
18398
  m_this._getMousePosition(evt);
18296
18399
  m_this._getMouseButton(evt);
18297
18400
  m_this._getMouseModifiers(evt);
18401
+ m_this.map().geoTrigger(geo_event.mousedown, m_this.mouse());
18298
18402
  if (m_options.click.enabled && (!m_mouse.buttons.left || m_options.click.buttons.left) && (!m_mouse.buttons.right || m_options.click.buttons.right) && (!m_mouse.buttons.middle || m_options.click.buttons.middle)) {
18299
18403
  m_this._setClickMaybe({
18300
18404
  x: m_mouse.page.x,
@@ -18722,6 +18826,7 @@ var mapInteractor = function mapInteractor(args) {
18722
18826
  * @fires geo.event.brushend
18723
18827
  * @fires geo.event.actionselection
18724
18828
  * @fires geo.event.actionup
18829
+ * @fires geo.event.mouseup
18725
18830
  * @fires geo.event.select
18726
18831
  * @fires geo.event.zoomselect
18727
18832
  * @fires geo.event.unzoomselect
@@ -18802,6 +18907,9 @@ var mapInteractor = function mapInteractor(args) {
18802
18907
  if (m_clickMaybe) {
18803
18908
  m_this._handleMouseClick(evt);
18804
18909
  }
18910
+ var details = m_this.mouse();
18911
+ details.buttonsDown = m_clickMaybe.buttons;
18912
+ m_this.map().geoTrigger(geo_event.mouseup, details);
18805
18913
  };
18806
18914
 
18807
18915
  /**
@@ -24903,7 +25011,7 @@ module.exports = sceneObject;
24903
25011
  * @constant
24904
25012
  * @type {string}
24905
25013
  */
24906
- module.exports = "74bcf5a55546c18bebd75c1826a0fa8079e7b374";
25014
+ module.exports = "953e0f4a63df9a9570c75623872aecfc44deb93a";
24907
25015
 
24908
25016
  /***/ }),
24909
25017
 
@@ -36781,7 +36889,7 @@ module.exports = vectorFeature;
36781
36889
  * @constant
36782
36890
  * @type {string}
36783
36891
  */
36784
- module.exports = "1.10.14";
36892
+ module.exports = "1.10.16";
36785
36893
 
36786
36894
  /***/ }),
36787
36895
 
package/geo.lean.js CHANGED
@@ -8351,6 +8351,28 @@ geo_event.mousemove = 'geo_mousemove';
8351
8351
  */
8352
8352
  geo_event.mouseclick = 'geo_mouseclick';
8353
8353
 
8354
+ /**
8355
+ * Triggered on `mouseup` events. The event object extends
8356
+ * {@link geo.mouseState}.
8357
+ *
8358
+ * @event geo.event.mouseup
8359
+ * @type {(geo.event.base|geo.mouseState)}
8360
+ * @property {geo.mouseButtons} buttonsDown The buttons that were down at the
8361
+ * start of the up action.
8362
+ */
8363
+ geo_event.mouseup = 'geo_mouseup';
8364
+
8365
+ /**
8366
+ * Triggered on `mousedown` events. The event object extends
8367
+ * {@link geo.mouseState}.
8368
+ *
8369
+ * @event geo.event.mousedown
8370
+ * @type {(geo.event.base|geo.mouseState)}
8371
+ * @property {geo.mouseButtons} buttonsDown The buttons that were down at the
8372
+ * end of the down action.
8373
+ */
8374
+ geo_event.mousedown = 'geo_mousedown';
8375
+
8354
8376
  /**
8355
8377
  * Triggered on every `mousemove` during a brushing selection.
8356
8378
  * The event object extends {@link geo.brushSelection}.
@@ -8673,6 +8695,41 @@ geo_event.feature = {
8673
8695
  * @property {geo.event} sourceEvent The underlying event that trigger this.
8674
8696
  */
8675
8697
  mouseclick_order: 'geo_feature_mouseclick_order',
8698
+ /**
8699
+ * The event is the feature version of {@link geo.event.mousedown}.
8700
+ *
8701
+ * @event geo.event.feature.mousedown
8702
+ * @type {geo.event.base}
8703
+ * @property {object} data The feature data the mouse is above.
8704
+ * @property {number} index The index of the feature data the mouse is above.
8705
+ * @property {object} extra Extra information about the feature and mouse
8706
+ * location.
8707
+ * @property {geo.mouseState} mouse The mouse state.
8708
+ * @property {number} eventID a monotonically increasing event number. All
8709
+ * features that the mouse goes down on simultaneously will have the same
8710
+ * `eventID`.
8711
+ * @property {boolean} top True if this is the topmost data element.
8712
+ * @property {geo.event} sourceEvent The underlying event that trigger this.
8713
+ */
8714
+ mousedown: 'geo_feature_mousedown',
8715
+ /**
8716
+ * The event is the feature version of {@link geo.event.mouseup}.
8717
+ *
8718
+ * @event geo.event.feature.mouseup
8719
+ * @type {geo.event.base}
8720
+ * @property {object} data The feature data the mouse is above.
8721
+ * @property {number} index The index of the feature data the mouse is above.
8722
+ * @property {object} extra Extra information about the feature and mouse
8723
+ * location.
8724
+ * @property {geo.mouseState} mouse The mouse state. The buttons are before
8725
+ * the up action occurs.
8726
+ * @property {number} eventID a monotonically increasing event number. All
8727
+ * features that the mouse goes up on simultaneously will have the same
8728
+ * `eventID`.
8729
+ * @property {boolean} top True if this is the topmost data element.
8730
+ * @property {geo.event} sourceEvent The underlying event that trigger this.
8731
+ */
8732
+ mouseup: 'geo_feature_mouseup',
8676
8733
  /**
8677
8734
  * This event is fired for each data component of a feature under a brush
8678
8735
  * that has just finished its selection.
@@ -9091,6 +9148,8 @@ var feature = function feature(arg) {
9091
9148
  // First unbind to be sure that the handlers aren't bound twice.
9092
9149
  m_this._unbindMouseHandlers();
9093
9150
  m_this.geoOn(geo_event.mousemove, m_this._handleMousemove);
9151
+ m_this.geoOn(geo_event.mousedown, m_this._handleMousedown);
9152
+ m_this.geoOn(geo_event.mouseup, m_this._handleMouseup);
9094
9153
  m_this.geoOn(geo_event.mouseclick, m_this._handleMouseclick);
9095
9154
  m_this.geoOn(geo_event.brushend, m_this._handleBrushend);
9096
9155
  m_this.geoOn(geo_event.brush, m_this._handleBrush);
@@ -9101,6 +9160,8 @@ var feature = function feature(arg) {
9101
9160
  */
9102
9161
  this._unbindMouseHandlers = function () {
9103
9162
  m_this.geoOff(geo_event.mousemove, m_this._handleMousemove);
9163
+ m_this.geoOff(geo_event.mousedown, m_this._handleMousedown);
9164
+ m_this.geoOff(geo_event.mouseup, m_this._handleMouseup);
9104
9165
  m_this.geoOff(geo_event.mouseclick, m_this._handleMouseclick);
9105
9166
  m_this.geoOff(geo_event.brushend, m_this._handleBrushend);
9106
9167
  m_this.geoOff(geo_event.brush, m_this._handleBrush);
@@ -9171,20 +9232,46 @@ var feature = function feature(arg) {
9171
9232
  };
9172
9233
  };
9173
9234
 
9235
+ /**
9236
+ * Private mousedown handler. This uses `pointSearch` to determine which
9237
+ * features the mouse is over, then fires appropriate events.
9238
+ *
9239
+ * @param {geo.event} evt The event that triggered this handler.
9240
+ * @fires geo.event.feature.mousedown
9241
+ */
9242
+ this._handleMousedown = function (evt) {
9243
+ this._handleMousemove(evt, geo_event.feature.mousedown);
9244
+ };
9245
+
9246
+ /**
9247
+ * Private mouseup handler. This uses `pointSearch` to determine which
9248
+ * features the mouse is over, then fires appropriate events.
9249
+ *
9250
+ * @param {geo.event} evt The event that triggered this handler.
9251
+ * @fires geo.event.feature.mouseup
9252
+ */
9253
+ this._handleMouseup = function (evt) {
9254
+ this._handleMousemove(evt, geo_event.feature.mouseup);
9255
+ };
9256
+
9174
9257
  /**
9175
9258
  * Private mousemove handler. This uses `pointSearch` to determine which
9176
9259
  * features the mouse is over, then fires appropriate events.
9177
9260
  *
9178
9261
  * @param {geo.event} evt The event that triggered this handler.
9262
+ * @param {string} [updown] If "mouseup" or "mousedown", fire that event
9263
+ * instead of mouseon.
9179
9264
  * @fires geo.event.feature.mouseover_order
9180
9265
  * @fires geo.event.feature.mouseover
9181
9266
  * @fires geo.event.feature.mouseout
9182
9267
  * @fires geo.event.feature.mousemove
9183
9268
  * @fires geo.event.feature.mouseoff
9184
9269
  * @fires geo.event.feature.mouseon
9270
+ * @fires geo.event.feature.mouseup
9271
+ * @fires geo.event.feature.mousedown
9185
9272
  */
9186
- this._handleMousemove = function (evt) {
9187
- var mouse = m_this.layer().map().interactor().mouse(),
9273
+ this._handleMousemove = function (evt, updown) {
9274
+ var mouse = evt && evt.mouse ? evt.mouse : m_this.layer().map().interactor().mouse(),
9188
9275
  data = m_this.data(),
9189
9276
  over = m_this.pointSearch(mouse.geo),
9190
9277
  newFeatures = [],
@@ -9212,6 +9299,21 @@ var feature = function feature(arg) {
9212
9299
  sourceEvent: evt
9213
9300
  });
9214
9301
  }
9302
+ feature.eventID += 1;
9303
+ if (updown) {
9304
+ over.index.forEach(function (i, idx) {
9305
+ m_this.geoTrigger(updown, {
9306
+ data: data[i],
9307
+ index: i,
9308
+ extra: extra[i],
9309
+ mouse: mouse,
9310
+ eventID: feature.eventID,
9311
+ top: idx === over.length - 1,
9312
+ sourceEvent: evt
9313
+ }, true);
9314
+ });
9315
+ return;
9316
+ }
9215
9317
 
9216
9318
  // Get the index of the element that was previously on top
9217
9319
  if (m_selectedFeatures.length) {
@@ -9225,7 +9327,7 @@ var feature = function feature(arg) {
9225
9327
  oldFeatures = m_selectedFeatures.filter(function (i) {
9226
9328
  return over.index.indexOf(i) < 0;
9227
9329
  });
9228
- feature.eventID += 1;
9330
+
9229
9331
  // Fire events for mouse in first.
9230
9332
  newFeatures.forEach(function (i, idx) {
9231
9333
  m_this.geoTrigger(geo_event.feature.mouseover, {
@@ -18280,6 +18382,7 @@ var mapInteractor = function mapInteractor(args) {
18280
18382
  * @param {jQuery.Event} evt The event that triggered this.
18281
18383
  * @fires geo.event.brushstart
18282
18384
  * @fires geo.event.actiondown
18385
+ * @fires geo.event.mousedown
18283
18386
  */
18284
18387
  this._handleMouseDown = function (evt) {
18285
18388
  var action, actionRecord;
@@ -18295,6 +18398,7 @@ var mapInteractor = function mapInteractor(args) {
18295
18398
  m_this._getMousePosition(evt);
18296
18399
  m_this._getMouseButton(evt);
18297
18400
  m_this._getMouseModifiers(evt);
18401
+ m_this.map().geoTrigger(geo_event.mousedown, m_this.mouse());
18298
18402
  if (m_options.click.enabled && (!m_mouse.buttons.left || m_options.click.buttons.left) && (!m_mouse.buttons.right || m_options.click.buttons.right) && (!m_mouse.buttons.middle || m_options.click.buttons.middle)) {
18299
18403
  m_this._setClickMaybe({
18300
18404
  x: m_mouse.page.x,
@@ -18722,6 +18826,7 @@ var mapInteractor = function mapInteractor(args) {
18722
18826
  * @fires geo.event.brushend
18723
18827
  * @fires geo.event.actionselection
18724
18828
  * @fires geo.event.actionup
18829
+ * @fires geo.event.mouseup
18725
18830
  * @fires geo.event.select
18726
18831
  * @fires geo.event.zoomselect
18727
18832
  * @fires geo.event.unzoomselect
@@ -18802,6 +18907,9 @@ var mapInteractor = function mapInteractor(args) {
18802
18907
  if (m_clickMaybe) {
18803
18908
  m_this._handleMouseClick(evt);
18804
18909
  }
18910
+ var details = m_this.mouse();
18911
+ details.buttonsDown = m_clickMaybe.buttons;
18912
+ m_this.map().geoTrigger(geo_event.mouseup, details);
18805
18913
  };
18806
18914
 
18807
18915
  /**
@@ -24903,7 +25011,7 @@ module.exports = sceneObject;
24903
25011
  * @constant
24904
25012
  * @type {string}
24905
25013
  */
24906
- module.exports = "74bcf5a55546c18bebd75c1826a0fa8079e7b374";
25014
+ module.exports = "953e0f4a63df9a9570c75623872aecfc44deb93a";
24907
25015
 
24908
25016
  /***/ }),
24909
25017
 
@@ -36781,7 +36889,7 @@ module.exports = vectorFeature;
36781
36889
  * @constant
36782
36890
  * @type {string}
36783
36891
  */
36784
- module.exports = "1.10.14";
36892
+ module.exports = "1.10.16";
36785
36893
 
36786
36894
  /***/ }),
36787
36895