geojs 1.7.0 → 1.7.3

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.
@@ -10,6 +10,8 @@ on:
10
10
  release:
11
11
  types:
12
12
  - created
13
+ schedule:
14
+ - cron: "0 7 * * 1"
13
15
 
14
16
  jobs:
15
17
  build:
@@ -63,6 +65,24 @@ jobs:
63
65
  name: website
64
66
  path: |
65
67
  website/public
68
+ unpinned:
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - uses: actions/checkout@v2
72
+ # Don't pin version to test with the latest common version
73
+ - uses: actions/setup-node@v2
74
+ - run: npm --version && node --version
75
+ - uses: browser-actions/setup-firefox@latest
76
+ - run: sudo apt-get remove --yes fonts-lato
77
+ - run: fc-list
78
+ - run: firefox --version
79
+ - run: google-chrome --version
80
+ # Delete the package-lock to test with the latest libraries allowed
81
+ - run: rm package-lock.json
82
+ - run: npm install
83
+ - run: npm run setup-website
84
+ - run: npm run ci-xvfb
85
+ - run: npm run ci-build-website
66
86
  deploy-website:
67
87
  if: ${{ github.ref == 'refs/heads/master' }}
68
88
  needs: build
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # GeoJS Change Log
2
2
 
3
+ ## Version 1.7.3
4
+
5
+ ### Bug Fixes
6
+
7
+ - Emit layerMove event when changing a lyer's z-index ([#1185](../../pull/1185))
8
+
9
+ ## Version 1.7.2
10
+
11
+ ### Bug Fixes
12
+
13
+ - Tile layers with keepLower: false purged tiles on high zoom ([#1178](../../pull/1178))
14
+
15
+ ## Version 1.7.1
16
+
17
+ ### Improvements
18
+
19
+ - Reduce texture memory check ([#1175](../../pull/1175))
20
+
3
21
  ## Version 1.7.0
4
22
 
5
23
  ### Features
package/geo.js CHANGED
@@ -8138,6 +8138,16 @@ geo_event.layerAdd = 'geo_layerAdd';
8138
8138
  */
8139
8139
 
8140
8140
  geo_event.layerRemove = 'geo_layerRemove';
8141
+ /**
8142
+ * Triggered when a layer z-index is changed.
8143
+ *
8144
+ * @event geo.event.layerMove
8145
+ * @type {geo.event.base}
8146
+ * @property {geo.map} target The current map.
8147
+ * @property {geo.layer} layer The old layer that was removed.
8148
+ */
8149
+
8150
+ geo_event.layerMove = 'geo_layerMove';
8141
8151
  /**
8142
8152
  * Triggered when the map's zoom level is changed.
8143
8153
  *
@@ -13723,7 +13733,7 @@ var layer = function layer(arg) {
13723
13733
  if (zIndex !== m_zIndex) {
13724
13734
  m_zIndex = zIndex;
13725
13735
  m_node.css('z-index', m_zIndex);
13726
- m_this.geoTrigger(geo_event.layerRemove, {
13736
+ m_this.geoTrigger(geo_event.layerMove, {
13727
13737
  layer: m_this
13728
13738
  });
13729
13739
  }
@@ -26252,7 +26262,7 @@ module.exports = sceneObject;
26252
26262
  * @constant
26253
26263
  * @type {string}
26254
26264
  */
26255
- module.exports = "1d12f116c34ea5a1423ecb767df24b2291e53b06";
26265
+ module.exports = "0bc7b69498f5cc8cb411e7db7a8049eda5043a68";
26256
26266
 
26257
26267
  /***/ }),
26258
26268
 
@@ -29847,7 +29857,7 @@ var tileLayer = function tileLayer(arg) {
29847
29857
  changed = false,
29848
29858
  old,
29849
29859
  level,
29850
- minLevel = m_this._options.keepLower ? m_this._options.minLevel : Math.max(maxLevel, m_this._options.minLevel);
29860
+ minLevel = m_this._options.keepLower ? m_this._options.minLevel : Math.min(Math.max(maxLevel, m_this._options.minLevel), m_this._options.maxLevel);
29851
29861
 
29852
29862
  if (maxLevel < minLevel) {
29853
29863
  maxLevel = minLevel;
@@ -30787,7 +30797,7 @@ var tileLayer = function tileLayer(arg) {
30787
30797
  /* For tile layers that should only keep one layer, if loading is
30788
30798
  * finished, purge all but the current layer. This is important for
30789
30799
  * semi-transparent layers. */
30790
- if ((doneLoading || m_this._isCovered(tile)) && zoom !== tile.index.level && (zoom >= m_this._options.minLevel || tile.index.level !== m_this._options.minLevel)) {
30800
+ if ((doneLoading || m_this._isCovered(tile)) && zoom !== tile.index.level && (zoom >= m_this._options.minLevel || tile.index.level !== m_this._options.minLevel) && (zoom < m_this._options.maxLevel || tile.index.level !== m_this._options.maxLevel)) {
30791
30801
  return true;
30792
30802
  }
30793
30803
  }
@@ -30951,9 +30961,9 @@ var tileLayer = function tileLayer(arg) {
30951
30961
  /**
30952
30962
  * Get/set the baseQuad.
30953
30963
  *
30954
- * @property {object} [baseQuad] A quad feature element to draw before below
30955
- * any tile layers. If specified, this uses the quad defaults, so this is
30956
- * a ``geo.quadFeature.position`` object with, typically, an ``image``
30964
+ * @property {object} [baseQuad] A quad feature element to draw below any
30965
+ * tile layers. If specified, this uses the quad defaults, so this is a
30966
+ * ``geo.quadFeature.position`` object with, typically, an ``image``
30957
30967
  * property added to it. The quad positions are in the map gcs
30958
30968
  * coordinates.
30959
30969
  * @name geo.tileLayer.baseQuad
@@ -38716,7 +38726,7 @@ module.exports = vectorFeature;
38716
38726
  * @constant
38717
38727
  * @type {string}
38718
38728
  */
38719
- module.exports = "1.7.0";
38729
+ module.exports = "1.7.3";
38720
38730
 
38721
38731
  /***/ }),
38722
38732
 
@@ -42926,6 +42936,8 @@ var registerFeature = (__webpack_require__(4647).registerFeature);
42926
42936
  var quadFeature = __webpack_require__(5017);
42927
42937
 
42928
42938
  var timestamp = __webpack_require__(6618);
42939
+
42940
+ var _memoryCheckLargestTested = 4096 * 4096;
42929
42941
  /**
42930
42942
  * Create a new instance of class quadFeature.
42931
42943
  *
@@ -43343,8 +43355,12 @@ var webgl_quadFeature = function webgl_quadFeature(arg) {
43343
43355
  quad.texture.bind(renderState); // only check if the context is out of memory when using modestly large
43344
43356
  // textures. The check is slow.
43345
43357
 
43346
- if ((quad.image.width > 4096 || quad.image.height > 4096 || quad.image.width * quad.image.height > 4194304) && context.getError() === context.OUT_OF_MEMORY) {
43347
- console.log('Insufficient GPU memory for texture');
43358
+ if (quad.image.width * quad.image.height > _memoryCheckLargestTested) {
43359
+ _memoryCheckLargestTested = quad.image.width * quad.image.height;
43360
+
43361
+ if (context.getError() === context.OUT_OF_MEMORY) {
43362
+ console.log('Insufficient GPU memory for texture');
43363
+ }
43348
43364
  }
43349
43365
 
43350
43366
  if (quad.opacity !== opacity) {
@@ -44065,10 +44081,12 @@ var webglRenderer = function webglRenderer(arg) {
44065
44081
  renderState.m_context = m_this._glContext();
44066
44082
  m_viewer.exit(renderState);
44067
44083
 
44068
- if (m_this._glContext() !== vgl.GL && m_this._glContext().getExtension('WEBGL_lose_context') && m_this._glContext().getExtension('WEBGL_lose_context').loseContext) {
44069
- m_this._glContext().getExtension('WEBGL_lose_context').loseContext();
44084
+ var context = m_this._glContext();
44085
+
44086
+ if (context !== vgl.GL && context.getExtension('WEBGL_lose_context') && context.getExtension('WEBGL_lose_context').loseContext) {
44087
+ context.getExtension('WEBGL_lose_context').loseContext();
44070
44088
  }
44071
- } // make sure we clear shaders associated with the generate context, too
44089
+ } // make sure we clear shaders associated with the generated context, too
44072
44090
 
44073
44091
 
44074
44092
  vgl.clearCachedShaders(vgl.GL);
package/geo.lean.js CHANGED
@@ -8138,6 +8138,16 @@ geo_event.layerAdd = 'geo_layerAdd';
8138
8138
  */
8139
8139
 
8140
8140
  geo_event.layerRemove = 'geo_layerRemove';
8141
+ /**
8142
+ * Triggered when a layer z-index is changed.
8143
+ *
8144
+ * @event geo.event.layerMove
8145
+ * @type {geo.event.base}
8146
+ * @property {geo.map} target The current map.
8147
+ * @property {geo.layer} layer The old layer that was removed.
8148
+ */
8149
+
8150
+ geo_event.layerMove = 'geo_layerMove';
8141
8151
  /**
8142
8152
  * Triggered when the map's zoom level is changed.
8143
8153
  *
@@ -13723,7 +13733,7 @@ var layer = function layer(arg) {
13723
13733
  if (zIndex !== m_zIndex) {
13724
13734
  m_zIndex = zIndex;
13725
13735
  m_node.css('z-index', m_zIndex);
13726
- m_this.geoTrigger(geo_event.layerRemove, {
13736
+ m_this.geoTrigger(geo_event.layerMove, {
13727
13737
  layer: m_this
13728
13738
  });
13729
13739
  }
@@ -26252,7 +26262,7 @@ module.exports = sceneObject;
26252
26262
  * @constant
26253
26263
  * @type {string}
26254
26264
  */
26255
- module.exports = "1d12f116c34ea5a1423ecb767df24b2291e53b06";
26265
+ module.exports = "0bc7b69498f5cc8cb411e7db7a8049eda5043a68";
26256
26266
 
26257
26267
  /***/ }),
26258
26268
 
@@ -29847,7 +29857,7 @@ var tileLayer = function tileLayer(arg) {
29847
29857
  changed = false,
29848
29858
  old,
29849
29859
  level,
29850
- minLevel = m_this._options.keepLower ? m_this._options.minLevel : Math.max(maxLevel, m_this._options.minLevel);
29860
+ minLevel = m_this._options.keepLower ? m_this._options.minLevel : Math.min(Math.max(maxLevel, m_this._options.minLevel), m_this._options.maxLevel);
29851
29861
 
29852
29862
  if (maxLevel < minLevel) {
29853
29863
  maxLevel = minLevel;
@@ -30787,7 +30797,7 @@ var tileLayer = function tileLayer(arg) {
30787
30797
  /* For tile layers that should only keep one layer, if loading is
30788
30798
  * finished, purge all but the current layer. This is important for
30789
30799
  * semi-transparent layers. */
30790
- if ((doneLoading || m_this._isCovered(tile)) && zoom !== tile.index.level && (zoom >= m_this._options.minLevel || tile.index.level !== m_this._options.minLevel)) {
30800
+ if ((doneLoading || m_this._isCovered(tile)) && zoom !== tile.index.level && (zoom >= m_this._options.minLevel || tile.index.level !== m_this._options.minLevel) && (zoom < m_this._options.maxLevel || tile.index.level !== m_this._options.maxLevel)) {
30791
30801
  return true;
30792
30802
  }
30793
30803
  }
@@ -30951,9 +30961,9 @@ var tileLayer = function tileLayer(arg) {
30951
30961
  /**
30952
30962
  * Get/set the baseQuad.
30953
30963
  *
30954
- * @property {object} [baseQuad] A quad feature element to draw before below
30955
- * any tile layers. If specified, this uses the quad defaults, so this is
30956
- * a ``geo.quadFeature.position`` object with, typically, an ``image``
30964
+ * @property {object} [baseQuad] A quad feature element to draw below any
30965
+ * tile layers. If specified, this uses the quad defaults, so this is a
30966
+ * ``geo.quadFeature.position`` object with, typically, an ``image``
30957
30967
  * property added to it. The quad positions are in the map gcs
30958
30968
  * coordinates.
30959
30969
  * @name geo.tileLayer.baseQuad
@@ -38716,7 +38726,7 @@ module.exports = vectorFeature;
38716
38726
  * @constant
38717
38727
  * @type {string}
38718
38728
  */
38719
- module.exports = "1.7.0";
38729
+ module.exports = "1.7.3";
38720
38730
 
38721
38731
  /***/ }),
38722
38732
 
@@ -42926,6 +42936,8 @@ var registerFeature = (__webpack_require__(4647).registerFeature);
42926
42936
  var quadFeature = __webpack_require__(5017);
42927
42937
 
42928
42938
  var timestamp = __webpack_require__(6618);
42939
+
42940
+ var _memoryCheckLargestTested = 4096 * 4096;
42929
42941
  /**
42930
42942
  * Create a new instance of class quadFeature.
42931
42943
  *
@@ -43343,8 +43355,12 @@ var webgl_quadFeature = function webgl_quadFeature(arg) {
43343
43355
  quad.texture.bind(renderState); // only check if the context is out of memory when using modestly large
43344
43356
  // textures. The check is slow.
43345
43357
 
43346
- if ((quad.image.width > 4096 || quad.image.height > 4096 || quad.image.width * quad.image.height > 4194304) && context.getError() === context.OUT_OF_MEMORY) {
43347
- console.log('Insufficient GPU memory for texture');
43358
+ if (quad.image.width * quad.image.height > _memoryCheckLargestTested) {
43359
+ _memoryCheckLargestTested = quad.image.width * quad.image.height;
43360
+
43361
+ if (context.getError() === context.OUT_OF_MEMORY) {
43362
+ console.log('Insufficient GPU memory for texture');
43363
+ }
43348
43364
  }
43349
43365
 
43350
43366
  if (quad.opacity !== opacity) {
@@ -44065,10 +44081,12 @@ var webglRenderer = function webglRenderer(arg) {
44065
44081
  renderState.m_context = m_this._glContext();
44066
44082
  m_viewer.exit(renderState);
44067
44083
 
44068
- if (m_this._glContext() !== vgl.GL && m_this._glContext().getExtension('WEBGL_lose_context') && m_this._glContext().getExtension('WEBGL_lose_context').loseContext) {
44069
- m_this._glContext().getExtension('WEBGL_lose_context').loseContext();
44084
+ var context = m_this._glContext();
44085
+
44086
+ if (context !== vgl.GL && context.getExtension('WEBGL_lose_context') && context.getExtension('WEBGL_lose_context').loseContext) {
44087
+ context.getExtension('WEBGL_lose_context').loseContext();
44070
44088
  }
44071
- } // make sure we clear shaders associated with the generate context, too
44089
+ } // make sure we clear shaders associated with the generated context, too
44072
44090
 
44073
44091
 
44074
44092
  vgl.clearCachedShaders(vgl.GL);