Browse Source

add the bounce primitive

tags/2.4.0
Caven Chen 4 years ago
parent
commit
da03f381ee

+ 0
- 18
modules/overlay/primitive/BounceBillboardPrimitive.js View File

@@ -71,24 +71,6 @@ class BounceBillboardPrimitive extends BillboardPrimitive {
this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1)
this._delegate.pixelOffset = this._currentOffset
}

/**
*
* @param style
* @returns {BounceBillboardPrimitive}
*/
setStyle(style) {
if (!style || Object.keys(style).length === 0) {
return this
}
delete style['position'] &&
delete style['image'] &&
delete style['width'] &&
delete style['height']
this._style = style
Util.merge(this._delegate, this._style)
return this
}
}

Overlay.registerType('bounce_billboard_primitive')

+ 0
- 15
modules/overlay/primitive/BounceLabelPrimitive.js View File

@@ -71,21 +71,6 @@ class BounceLabelPrimitive extends LabelPrimitive {
this._currentOffset.y += offsetAmount * (this._isUp ? -1 : 1)
this._delegate.pixelOffset = this._currentOffset
}

/**
*
* @param style
* @returns {BounceLabelPrimitive}
*/
setStyle(style) {
if (!style || Object.keys(style).length === 0) {
return this
}
delete style['position'] && delete style['text']
this._style = style
Util.merge(this._delegate, this._style)
return this
}
}

Overlay.registerType('bounce_label_primitive')

Loading…
Cancel
Save