geojs 1.7.2 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geojs",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "JavaScript Geo Visualization and Analysis Library",
5
5
  "homepage": "https://github.com/OpenGeoscience/geojs",
6
6
  "license": "Apache-2.0",
package/src/event.js CHANGED
@@ -50,6 +50,16 @@ geo_event.layerAdd = 'geo_layerAdd';
50
50
  */
51
51
  geo_event.layerRemove = 'geo_layerRemove';
52
52
 
53
+ /**
54
+ * Triggered when a layer z-index is changed.
55
+ *
56
+ * @event geo.event.layerMove
57
+ * @type {geo.event.base}
58
+ * @property {geo.map} target The current map.
59
+ * @property {geo.layer} layer The old layer that was removed.
60
+ */
61
+ geo_event.layerMove = 'geo_layerMove';
62
+
53
63
  /**
54
64
  * Triggered when the map's zoom level is changed.
55
65
  *
package/src/layer.js CHANGED
@@ -174,7 +174,7 @@ var layer = function (arg) {
174
174
  if (zIndex !== m_zIndex) {
175
175
  m_zIndex = zIndex;
176
176
  m_node.css('z-index', m_zIndex);
177
- m_this.geoTrigger(geo_event.layerRemove, {
177
+ m_this.geoTrigger(geo_event.layerMove, {
178
178
  layer: m_this
179
179
  });
180
180
  }
package/src/tileLayer.js CHANGED
@@ -1672,9 +1672,9 @@ var tileLayer = function (arg) {
1672
1672
  /**
1673
1673
  * Get/set the baseQuad.
1674
1674
  *
1675
- * @property {object} [baseQuad] A quad feature element to draw before below
1676
- * any tile layers. If specified, this uses the quad defaults, so this is
1677
- * a ``geo.quadFeature.position`` object with, typically, an ``image``
1675
+ * @property {object} [baseQuad] A quad feature element to draw below any
1676
+ * tile layers. If specified, this uses the quad defaults, so this is a
1677
+ * ``geo.quadFeature.position`` object with, typically, an ``image``
1678
1678
  * property added to it. The quad positions are in the map gcs
1679
1679
  * coordinates.
1680
1680
  * @name geo.tileLayer.baseQuad
@@ -184,11 +184,12 @@ var webglRenderer = function (arg) {
184
184
  renderState.m_renderer = m_viewer;
185
185
  renderState.m_context = m_this._glContext();
186
186
  m_viewer.exit(renderState);
187
- if (m_this._glContext() !== vgl.GL && m_this._glContext().getExtension('WEBGL_lose_context') && m_this._glContext().getExtension('WEBGL_lose_context').loseContext) {
188
- m_this._glContext().getExtension('WEBGL_lose_context').loseContext();
187
+ const context = m_this._glContext();
188
+ if (context !== vgl.GL && context.getExtension('WEBGL_lose_context') && context.getExtension('WEBGL_lose_context').loseContext) {
189
+ context.getExtension('WEBGL_lose_context').loseContext();
189
190
  }
190
191
  }
191
- // make sure we clear shaders associated with the generate context, too
192
+ // make sure we clear shaders associated with the generated context, too
192
193
  vgl.clearCachedShaders(vgl.GL);
193
194
  m_viewer = null;
194
195
  s_exit();