geojs 1.14.11 → 1.14.13
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/.github/workflows/commitlint.yml +1 -1
- package/.github/workflows/main.yml +5 -5
- package/geo.js +54 -15
- package/geo.lean.js +54 -15
- package/geo.lean.min.js +3 -3
- package/geo.min.js +4 -4
- package/package.json +1 -1
- package/src/annotationLayer.js +7 -3
- package/src/event.js +7 -1
- package/src/feature.js +0 -1
- package/src/pointFeature.js +0 -5
- package/src/svg/object.js +21 -0
- package/src/svg/svgRenderer.js +15 -2
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
build:
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
21
|
- uses: actions/setup-node@v4
|
|
22
22
|
with:
|
|
23
23
|
node-version: '20'
|
|
@@ -69,7 +69,7 @@ jobs:
|
|
|
69
69
|
unpinned:
|
|
70
70
|
runs-on: ubuntu-latest
|
|
71
71
|
steps:
|
|
72
|
-
- uses: actions/checkout@
|
|
72
|
+
- uses: actions/checkout@v5
|
|
73
73
|
# Don't pin version to test with the latest common version
|
|
74
74
|
- uses: actions/setup-node@v4
|
|
75
75
|
with:
|
|
@@ -95,7 +95,7 @@ jobs:
|
|
|
95
95
|
runs-on: ubuntu-latest
|
|
96
96
|
steps:
|
|
97
97
|
- name: Import artifacts
|
|
98
|
-
uses: actions/download-artifact@
|
|
98
|
+
uses: actions/download-artifact@v5
|
|
99
99
|
with:
|
|
100
100
|
name: website
|
|
101
101
|
path: website/public
|
|
@@ -109,7 +109,7 @@ jobs:
|
|
|
109
109
|
needs: build
|
|
110
110
|
runs-on: ubuntu-latest
|
|
111
111
|
steps:
|
|
112
|
-
- uses: actions/checkout@
|
|
112
|
+
- uses: actions/checkout@v5
|
|
113
113
|
- uses: actions/setup-node@v4
|
|
114
114
|
with:
|
|
115
115
|
node-version: 'lts/*'
|
|
@@ -117,7 +117,7 @@ jobs:
|
|
|
117
117
|
- run: sudo apt-get install --yes --no-install-recommends optipng imagemagick build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev liblzma-dev
|
|
118
118
|
- run: npm ci
|
|
119
119
|
- name: Import artifacts
|
|
120
|
-
uses: actions/download-artifact@
|
|
120
|
+
uses: actions/download-artifact@v5
|
|
121
121
|
with:
|
|
122
122
|
name: dist
|
|
123
123
|
path: dist
|
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
|
}
|
|
@@ -10523,10 +10522,12 @@ var _annotationLayer = function annotationLayer(arg) {
|
|
|
10523
10522
|
* edited or used.
|
|
10524
10523
|
* @param {object} [options] Additional options to pass when creating an
|
|
10525
10524
|
* annotation.
|
|
10525
|
+
* @param {string} [reason] An optional reason to pass to the
|
|
10526
|
+
* `geo.event.annotation.mode` event.
|
|
10526
10527
|
* @returns {string|null|this} The current mode or the layer.
|
|
10527
10528
|
* @fires geo.event.annotation.mode
|
|
10528
10529
|
*/
|
|
10529
|
-
this.mode = function (arg, editAnnotation, options) {
|
|
10530
|
+
this.mode = function (arg, editAnnotation, options, reason) {
|
|
10530
10531
|
if (arg === undefined) {
|
|
10531
10532
|
return m_mode;
|
|
10532
10533
|
}
|
|
@@ -10548,12 +10549,14 @@ var _annotationLayer = function annotationLayer(arg) {
|
|
|
10548
10549
|
}
|
|
10549
10550
|
if (m_mode) {
|
|
10550
10551
|
m_keyHandler.bind('esc', function () {
|
|
10551
|
-
m_this.mode(null);
|
|
10552
|
+
m_this.mode(null, undefined, undefined, 'escape');
|
|
10552
10553
|
});
|
|
10553
10554
|
} else {
|
|
10554
10555
|
m_keyHandler.unbind('esc');
|
|
10555
10556
|
}
|
|
10557
|
+
var oldState;
|
|
10556
10558
|
if (m_this.currentAnnotation) {
|
|
10559
|
+
oldState = m_this.currentAnnotation.state();
|
|
10557
10560
|
switch (m_this.currentAnnotation.state()) {
|
|
10558
10561
|
case geo_annotation.state.create:
|
|
10559
10562
|
m_this.removeAnnotation(m_this.currentAnnotation);
|
|
@@ -10602,7 +10605,9 @@ var _annotationLayer = function annotationLayer(arg) {
|
|
|
10602
10605
|
}
|
|
10603
10606
|
m_this.geoTrigger(geo_event.annotation.mode, {
|
|
10604
10607
|
mode: m_mode,
|
|
10605
|
-
oldMode: oldMode
|
|
10608
|
+
oldMode: oldMode,
|
|
10609
|
+
oldState: oldState,
|
|
10610
|
+
reason: reason
|
|
10606
10611
|
});
|
|
10607
10612
|
if (oldMode === m_this.modes.edit || oldMode === m_this.modes.cursor) {
|
|
10608
10613
|
m_this.modified();
|
|
@@ -13258,9 +13263,16 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13258
13263
|
return m_this;
|
|
13259
13264
|
};
|
|
13260
13265
|
|
|
13266
|
+
/**
|
|
13267
|
+
* Schedule an update in the next render frame.
|
|
13268
|
+
*/
|
|
13269
|
+
this._scheduleUpdate = function () {
|
|
13270
|
+
m_this.layer().map().scheduleAnimationFrame(m_this._renderFrame);
|
|
13271
|
+
};
|
|
13272
|
+
|
|
13261
13273
|
/**
|
|
13262
13274
|
* Render all features that are marked as needing an update. This should
|
|
13263
|
-
* only be called
|
|
13275
|
+
* only be called during an animation frame.
|
|
13264
13276
|
*/
|
|
13265
13277
|
this._renderFrame = function () {
|
|
13266
13278
|
var id;
|
|
@@ -13276,6 +13288,11 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13276
13288
|
m_this._renderFeature(id);
|
|
13277
13289
|
}
|
|
13278
13290
|
}
|
|
13291
|
+
for (id in m_features) {
|
|
13292
|
+
if (m_features.hasOwnProperty(id) && ids[id] === undefined) {
|
|
13293
|
+
m_this.select(id).attr('visibility', !m_features[id].visible || m_features[id].visible() ? 'visible' : 'hidden');
|
|
13294
|
+
}
|
|
13295
|
+
}
|
|
13279
13296
|
};
|
|
13280
13297
|
|
|
13281
13298
|
/**
|
|
@@ -13290,6 +13307,7 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13290
13307
|
if (!m_features[id]) {
|
|
13291
13308
|
return m_this;
|
|
13292
13309
|
}
|
|
13310
|
+
m_this.select(id).remove();
|
|
13293
13311
|
var data = m_features[id].data,
|
|
13294
13312
|
index = m_features[id].index,
|
|
13295
13313
|
style = m_features[id].style,
|
|
@@ -13309,7 +13327,7 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13309
13327
|
rendersel.attr('class', classes.concat([id]).join(' '));
|
|
13310
13328
|
setStyles(rendersel, style);
|
|
13311
13329
|
if (visible) {
|
|
13312
|
-
rendersel.
|
|
13330
|
+
rendersel.attr('visibility', visible() ? 'visible' : 'hidden');
|
|
13313
13331
|
}
|
|
13314
13332
|
if (entries.size() && m_features[id].sortByZ) {
|
|
13315
13333
|
selection.sort(function (a, b) {
|
|
@@ -26454,7 +26472,7 @@ module.exports = svg_tileLayer;
|
|
|
26454
26472
|
* @constant
|
|
26455
26473
|
* @type {string}
|
|
26456
26474
|
*/
|
|
26457
|
-
module.exports = "1.14.
|
|
26475
|
+
module.exports = "1.14.13";
|
|
26458
26476
|
|
|
26459
26477
|
/***/ }),
|
|
26460
26478
|
|
|
@@ -28771,6 +28789,7 @@ var _svg_object = function svg_object(arg) {
|
|
|
28771
28789
|
var m_id = 'svg-' + uniqueID(),
|
|
28772
28790
|
s_exit = this._exit,
|
|
28773
28791
|
m_this = this,
|
|
28792
|
+
s_visible = this.visible,
|
|
28774
28793
|
s_draw = this.draw;
|
|
28775
28794
|
this._svgid = function () {
|
|
28776
28795
|
return m_id;
|
|
@@ -28805,6 +28824,26 @@ var _svg_object = function svg_object(arg) {
|
|
|
28805
28824
|
m_this.renderer()._removeFeature(m_this._svgid());
|
|
28806
28825
|
s_exit();
|
|
28807
28826
|
};
|
|
28827
|
+
|
|
28828
|
+
/**
|
|
28829
|
+
* Get/Set the visibility of the feature.
|
|
28830
|
+
*
|
|
28831
|
+
* @param {boolean} [val] A boolean to change the visibility, or `undefined`
|
|
28832
|
+
* to return the visibility.
|
|
28833
|
+
* @param {boolean} [direct] If `true`, when getting the visibility,
|
|
28834
|
+
* disregard the visibility of the parent layer, and when setting, refresh
|
|
28835
|
+
* the state regardless of whether it has changed or not. Otherwise, the
|
|
28836
|
+
* functional visibility is returned, where both the feature and the layer
|
|
28837
|
+
* must be visible for a `true` result.
|
|
28838
|
+
* @returns {boolean|this} Either the visibility (if getting) or the feature
|
|
28839
|
+
* (if setting).
|
|
28840
|
+
*/
|
|
28841
|
+
this.visible = function (val, direct) {
|
|
28842
|
+
if (val !== undefined && val !== s_visible(undefined, true) && m_this.renderer()) {
|
|
28843
|
+
m_this.renderer()._scheduleUpdate();
|
|
28844
|
+
}
|
|
28845
|
+
return s_visible(val, direct);
|
|
28846
|
+
};
|
|
28808
28847
|
return this;
|
|
28809
28848
|
};
|
|
28810
28849
|
module.exports = _svg_object;
|
|
@@ -83033,9 +83072,15 @@ geo_event.annotation.state = 'geo_annotation_state';
|
|
|
83033
83072
|
* @event geo.event.annotation.mode
|
|
83034
83073
|
* @type {geo.event.base}
|
|
83035
83074
|
* @property {string?} mode The new annotation mode. This is one of the values
|
|
83036
|
-
* from {@link geo.
|
|
83075
|
+
* from {@link geo.annotationLayer.mode} or an annotation name.
|
|
83037
83076
|
* @property {string?} oldMode The annotation mode before this change. This is
|
|
83077
|
+
* one of the values from {@link geo.annotationLayer.mode} or an
|
|
83078
|
+
* annotation name.
|
|
83079
|
+
* @property {string?} oldState If there was an active annotation before the
|
|
83080
|
+
* mode change, this is the annotation state before the change. This is
|
|
83038
83081
|
* one of the values from {@link geo.annotation.state}.
|
|
83082
|
+
* @property {string?} reason An optional string that was passed to the mode
|
|
83083
|
+
* change method.
|
|
83039
83084
|
*/
|
|
83040
83085
|
geo_event.annotation.mode = 'geo_annotation_mode';
|
|
83041
83086
|
|
|
@@ -89675,12 +89720,6 @@ var _pointFeature = function pointFeature(arg) {
|
|
|
89675
89720
|
var d = clusters[cidx];
|
|
89676
89721
|
// mark the datum as a cluster for accessor methods
|
|
89677
89722
|
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
89723
|
data[didx] = d;
|
|
89685
89724
|
}
|
|
89686
89725
|
|
|
@@ -97908,7 +97947,7 @@ module.exports = "/* quadFeature Color fragment shader */\n\nvarying mediump vec
|
|
|
97908
97947
|
* @constant
|
|
97909
97948
|
* @type {string}
|
|
97910
97949
|
*/
|
|
97911
|
-
module.exports = "
|
|
97950
|
+
module.exports = "f795280c0f9543f402b7e5240cc9b2698c80e89b";
|
|
97912
97951
|
|
|
97913
97952
|
/***/ }),
|
|
97914
97953
|
|
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
|
}
|
|
@@ -10523,10 +10522,12 @@ var _annotationLayer = function annotationLayer(arg) {
|
|
|
10523
10522
|
* edited or used.
|
|
10524
10523
|
* @param {object} [options] Additional options to pass when creating an
|
|
10525
10524
|
* annotation.
|
|
10525
|
+
* @param {string} [reason] An optional reason to pass to the
|
|
10526
|
+
* `geo.event.annotation.mode` event.
|
|
10526
10527
|
* @returns {string|null|this} The current mode or the layer.
|
|
10527
10528
|
* @fires geo.event.annotation.mode
|
|
10528
10529
|
*/
|
|
10529
|
-
this.mode = function (arg, editAnnotation, options) {
|
|
10530
|
+
this.mode = function (arg, editAnnotation, options, reason) {
|
|
10530
10531
|
if (arg === undefined) {
|
|
10531
10532
|
return m_mode;
|
|
10532
10533
|
}
|
|
@@ -10548,12 +10549,14 @@ var _annotationLayer = function annotationLayer(arg) {
|
|
|
10548
10549
|
}
|
|
10549
10550
|
if (m_mode) {
|
|
10550
10551
|
m_keyHandler.bind('esc', function () {
|
|
10551
|
-
m_this.mode(null);
|
|
10552
|
+
m_this.mode(null, undefined, undefined, 'escape');
|
|
10552
10553
|
});
|
|
10553
10554
|
} else {
|
|
10554
10555
|
m_keyHandler.unbind('esc');
|
|
10555
10556
|
}
|
|
10557
|
+
var oldState;
|
|
10556
10558
|
if (m_this.currentAnnotation) {
|
|
10559
|
+
oldState = m_this.currentAnnotation.state();
|
|
10557
10560
|
switch (m_this.currentAnnotation.state()) {
|
|
10558
10561
|
case geo_annotation.state.create:
|
|
10559
10562
|
m_this.removeAnnotation(m_this.currentAnnotation);
|
|
@@ -10602,7 +10605,9 @@ var _annotationLayer = function annotationLayer(arg) {
|
|
|
10602
10605
|
}
|
|
10603
10606
|
m_this.geoTrigger(geo_event.annotation.mode, {
|
|
10604
10607
|
mode: m_mode,
|
|
10605
|
-
oldMode: oldMode
|
|
10608
|
+
oldMode: oldMode,
|
|
10609
|
+
oldState: oldState,
|
|
10610
|
+
reason: reason
|
|
10606
10611
|
});
|
|
10607
10612
|
if (oldMode === m_this.modes.edit || oldMode === m_this.modes.cursor) {
|
|
10608
10613
|
m_this.modified();
|
|
@@ -13258,9 +13263,16 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13258
13263
|
return m_this;
|
|
13259
13264
|
};
|
|
13260
13265
|
|
|
13266
|
+
/**
|
|
13267
|
+
* Schedule an update in the next render frame.
|
|
13268
|
+
*/
|
|
13269
|
+
this._scheduleUpdate = function () {
|
|
13270
|
+
m_this.layer().map().scheduleAnimationFrame(m_this._renderFrame);
|
|
13271
|
+
};
|
|
13272
|
+
|
|
13261
13273
|
/**
|
|
13262
13274
|
* Render all features that are marked as needing an update. This should
|
|
13263
|
-
* only be called
|
|
13275
|
+
* only be called during an animation frame.
|
|
13264
13276
|
*/
|
|
13265
13277
|
this._renderFrame = function () {
|
|
13266
13278
|
var id;
|
|
@@ -13276,6 +13288,11 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13276
13288
|
m_this._renderFeature(id);
|
|
13277
13289
|
}
|
|
13278
13290
|
}
|
|
13291
|
+
for (id in m_features) {
|
|
13292
|
+
if (m_features.hasOwnProperty(id) && ids[id] === undefined) {
|
|
13293
|
+
m_this.select(id).attr('visibility', !m_features[id].visible || m_features[id].visible() ? 'visible' : 'hidden');
|
|
13294
|
+
}
|
|
13295
|
+
}
|
|
13279
13296
|
};
|
|
13280
13297
|
|
|
13281
13298
|
/**
|
|
@@ -13290,6 +13307,7 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13290
13307
|
if (!m_features[id]) {
|
|
13291
13308
|
return m_this;
|
|
13292
13309
|
}
|
|
13310
|
+
m_this.select(id).remove();
|
|
13293
13311
|
var data = m_features[id].data,
|
|
13294
13312
|
index = m_features[id].index,
|
|
13295
13313
|
style = m_features[id].style,
|
|
@@ -13309,7 +13327,7 @@ var _svgRenderer = function svgRenderer(arg) {
|
|
|
13309
13327
|
rendersel.attr('class', classes.concat([id]).join(' '));
|
|
13310
13328
|
setStyles(rendersel, style);
|
|
13311
13329
|
if (visible) {
|
|
13312
|
-
rendersel.
|
|
13330
|
+
rendersel.attr('visibility', visible() ? 'visible' : 'hidden');
|
|
13313
13331
|
}
|
|
13314
13332
|
if (entries.size() && m_features[id].sortByZ) {
|
|
13315
13333
|
selection.sort(function (a, b) {
|
|
@@ -23463,7 +23481,7 @@ module.exports = svg_tileLayer;
|
|
|
23463
23481
|
* @constant
|
|
23464
23482
|
* @type {string}
|
|
23465
23483
|
*/
|
|
23466
|
-
module.exports = "1.14.
|
|
23484
|
+
module.exports = "1.14.13";
|
|
23467
23485
|
|
|
23468
23486
|
/***/ }),
|
|
23469
23487
|
|
|
@@ -25780,6 +25798,7 @@ var _svg_object = function svg_object(arg) {
|
|
|
25780
25798
|
var m_id = 'svg-' + uniqueID(),
|
|
25781
25799
|
s_exit = this._exit,
|
|
25782
25800
|
m_this = this,
|
|
25801
|
+
s_visible = this.visible,
|
|
25783
25802
|
s_draw = this.draw;
|
|
25784
25803
|
this._svgid = function () {
|
|
25785
25804
|
return m_id;
|
|
@@ -25814,6 +25833,26 @@ var _svg_object = function svg_object(arg) {
|
|
|
25814
25833
|
m_this.renderer()._removeFeature(m_this._svgid());
|
|
25815
25834
|
s_exit();
|
|
25816
25835
|
};
|
|
25836
|
+
|
|
25837
|
+
/**
|
|
25838
|
+
* Get/Set the visibility of the feature.
|
|
25839
|
+
*
|
|
25840
|
+
* @param {boolean} [val] A boolean to change the visibility, or `undefined`
|
|
25841
|
+
* to return the visibility.
|
|
25842
|
+
* @param {boolean} [direct] If `true`, when getting the visibility,
|
|
25843
|
+
* disregard the visibility of the parent layer, and when setting, refresh
|
|
25844
|
+
* the state regardless of whether it has changed or not. Otherwise, the
|
|
25845
|
+
* functional visibility is returned, where both the feature and the layer
|
|
25846
|
+
* must be visible for a `true` result.
|
|
25847
|
+
* @returns {boolean|this} Either the visibility (if getting) or the feature
|
|
25848
|
+
* (if setting).
|
|
25849
|
+
*/
|
|
25850
|
+
this.visible = function (val, direct) {
|
|
25851
|
+
if (val !== undefined && val !== s_visible(undefined, true) && m_this.renderer()) {
|
|
25852
|
+
m_this.renderer()._scheduleUpdate();
|
|
25853
|
+
}
|
|
25854
|
+
return s_visible(val, direct);
|
|
25855
|
+
};
|
|
25817
25856
|
return this;
|
|
25818
25857
|
};
|
|
25819
25858
|
module.exports = _svg_object;
|
|
@@ -55209,9 +55248,15 @@ geo_event.annotation.state = 'geo_annotation_state';
|
|
|
55209
55248
|
* @event geo.event.annotation.mode
|
|
55210
55249
|
* @type {geo.event.base}
|
|
55211
55250
|
* @property {string?} mode The new annotation mode. This is one of the values
|
|
55212
|
-
* from {@link geo.
|
|
55251
|
+
* from {@link geo.annotationLayer.mode} or an annotation name.
|
|
55213
55252
|
* @property {string?} oldMode The annotation mode before this change. This is
|
|
55253
|
+
* one of the values from {@link geo.annotationLayer.mode} or an
|
|
55254
|
+
* annotation name.
|
|
55255
|
+
* @property {string?} oldState If there was an active annotation before the
|
|
55256
|
+
* mode change, this is the annotation state before the change. This is
|
|
55214
55257
|
* one of the values from {@link geo.annotation.state}.
|
|
55258
|
+
* @property {string?} reason An optional string that was passed to the mode
|
|
55259
|
+
* change method.
|
|
55215
55260
|
*/
|
|
55216
55261
|
geo_event.annotation.mode = 'geo_annotation_mode';
|
|
55217
55262
|
|
|
@@ -61851,12 +61896,6 @@ var _pointFeature = function pointFeature(arg) {
|
|
|
61851
61896
|
var d = clusters[cidx];
|
|
61852
61897
|
// mark the datum as a cluster for accessor methods
|
|
61853
61898
|
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
61899
|
data[didx] = d;
|
|
61861
61900
|
}
|
|
61862
61901
|
|
|
@@ -70094,7 +70133,7 @@ module.exports = "/* quadFeature Color fragment shader */\n\nvarying mediump vec
|
|
|
70094
70133
|
* @constant
|
|
70095
70134
|
* @type {string}
|
|
70096
70135
|
*/
|
|
70097
|
-
module.exports = "
|
|
70136
|
+
module.exports = "f795280c0f9543f402b7e5240cc9b2698c80e89b";
|
|
70098
70137
|
|
|
70099
70138
|
/***/ }),
|
|
70100
70139
|
|