Przeglądaj źródła

add destroy function

tags/2.8.0
Caven Chen 3 lat temu
rodzic
commit
ec6f2db2b7

+ 7
- 3
modules/overlay/primitive/BounceBillboardPrimitive.js Wyświetl plik

this._layer.delegate.remove(this) this._layer.delegate.remove(this)
} }


/**
*
*/
update() { update() {
if (!this._show) { if (!this._show) {
return return
this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1) this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1)
this._delegate.pixelOffset = this._currentOffset this._delegate.pixelOffset = this._currentOffset
} }

/**
* @return {*}
*/
destroy() {
return Cesium.destroyObject(this)
}
} }


Overlay.registerType('bounce_billboard_primitive') Overlay.registerType('bounce_billboard_primitive')

+ 7
- 3
modules/overlay/primitive/BounceLabelPrimitive.js Wyświetl plik

this._layer.delegate.remove(this) this._layer.delegate.remove(this)
} }


/**
*
*/
update() { update() {
if (!this._show) { if (!this._show) {
return return
this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1) this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1)
this._delegate.pixelOffset = this._currentOffset this._delegate.pixelOffset = this._currentOffset
} }

/**
* @return {*}
*/
destroy() {
return Cesium.destroyObject(this)
}
} }


Overlay.registerType('bounce_label_primitive') Overlay.registerType('bounce_label_primitive')

Ładowanie…
Anuluj
Zapisz