File tree Expand file tree Collapse file tree 4 files changed +30
-3
lines changed
Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 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 "
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 >
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff 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+ } ;
You can’t perform that action at this time.
0 commit comments