Skip to content

Commit d1b34a0

Browse files
committed
Merge pull request #271 from gberaudo/prepare_release_1.9
Prepare release 1.9
2 parents dea7cb2 + 10e5f32 commit d1b34a0

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## v1.9
3+
## v1.9 - 2015-10-22
44

55
* Breaking changes
66
* Port to OL 3.10.1, remove saturation, gamma and hue functions.

examples/vectors.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div><input type="button" value="Enable/disable Cesium"
1515
onclick="javascript:ol3d.setEnabled(!ol3d.getEnabled())" /></div>
1616
<div><input type="button" value="Toggle depth test"
17-
onclick="javascript:scene.globe.depthTestAgainstTerrain = !scene.globe.depthTestAgainstTerrain" /></div>
17+
onclick="javascript:scene.globe.depthTestAgainstTerrain = !scene.globe.depthTestAgainstTerrain; ol3d.getAutoRenderLoop().restartRenderLoop()" /></div>
1818
<div><input type="button" value="Toggle circle style"
1919
onclick="javascript:toggleStyle()" /></div>
2020
<div><input type="button" value="Add/remove one vector layer"
@@ -24,7 +24,7 @@
2424
<div><input type="button" value="Toggle clampToGround mode"
2525
onclick="javascript:toggleClampToGround()" /></div>
2626
<div>Vectors are synchronized from the ol3 map to the Cesium scene.
27-
<br/>3D positioning and some styling is supported.</div>
27+
<br/>3D positioning and some styling is supported.<br />The render loop is automatically stopped when idle.</div>
2828
<script src="../ol3/build/ol.js"></script>
2929
<script src="../cesium/Build/Cesium/Cesium.js"></script>
3030
<script src="/@loader"></script>

src/autorenderloop.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ olcs.AutoRenderLoop.prototype.enable = function() {
116116

117117
return result;
118118
};
119+
120+
// Listen for changes on the layer group
121+
this.ol3d.getOlMap().getLayerGroup().on('change',
122+
this._boundNotifyRepaintRequired);
119123
};
120124

121125

@@ -147,6 +151,9 @@ olcs.AutoRenderLoop.prototype.disable = function() {
147151

148152
Cesium.loadWithXhr.load = this._originalLoadWithXhr;
149153
Cesium.TaskProcessor.prototype.scheduleTask = this._originalScheduleTask;
154+
155+
this.ol3d.getOlMap().getLayerGroup().un('change',
156+
this._boundNotifyRepaintRequired);
150157
};
151158

152159

@@ -190,6 +197,16 @@ olcs.AutoRenderLoop.prototype.postRender = function(date) {
190197
};
191198

192199

200+
/**
201+
* Restart render loop.
202+
* Force a restart of the render loop.
203+
* @api
204+
*/
205+
olcs.AutoRenderLoop.prototype.restartRenderLoop = function() {
206+
this.notifyRepaintRequired();
207+
};
208+
209+
193210
/**
194211
* Notifies the viewer that a repaint is required.
195212
*/

src/ol3cesium.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,3 +332,13 @@ olcs.OLCesium.prototype.enableAutoRenderLoop = function() {
332332
this.autoRenderLoop_ = new olcs.AutoRenderLoop(this, false);
333333
}
334334
};
335+
336+
337+
/**
338+
* Get the autorender loop.
339+
* @return {?olcs.AutoRenderLoop}
340+
* @api
341+
*/
342+
olcs.OLCesium.prototype.getAutoRenderLoop = function() {
343+
return this.autoRenderLoop_;
344+
};

0 commit comments

Comments
 (0)