javascript - How to stop a scheduled ontick event on Cesium -


i have 2 buttons on code add , delete primitives when clicked. on other hand, have event listener ontick method input active primitive , variable indicating index, , supposed used primitive particular index event.

when did debugging saw although input argument updated parameter used event listener not updated. , got error object destroyed.

do know how can update these arguments or stop scheduled events?

ontick cesium event addeventlistener function returns hook unsubscribe. call return value, later, when want end subscription event.

var unsubscribe = viewer.clock.ontick.addeventlistener(mycallback);  // ... later ...  // stop ontick callback. unsubscribe(); 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -