浏览代码

add destroy function

tags/2.8.0
Caven Chen 3 年前
父节点
当前提交
ec6f2db2b7

+ 7
- 3
modules/overlay/primitive/BounceBillboardPrimitive.js 查看文件

@@ -49,9 +49,6 @@ class BounceBillboardPrimitive extends BillboardPrimitive {
this._layer.delegate.remove(this)
}

/**
*
*/
update() {
if (!this._show) {
return
@@ -66,6 +63,13 @@ class BounceBillboardPrimitive extends BillboardPrimitive {
this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1)
this._delegate.pixelOffset = this._currentOffset
}

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

Overlay.registerType('bounce_billboard_primitive')

+ 7
- 3
modules/overlay/primitive/BounceLabelPrimitive.js 查看文件

@@ -49,9 +49,6 @@ class BounceLabelPrimitive extends LabelPrimitive {
this._layer.delegate.remove(this)
}

/**
*
*/
update() {
if (!this._show) {
return
@@ -66,6 +63,13 @@ class BounceLabelPrimitive extends LabelPrimitive {
this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1)
this._delegate.pixelOffset = this._currentOffset
}

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

Overlay.registerType('bounce_label_primitive')

正在加载...
取消
保存