MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / clone

Method clone

src/openlayers/overlay/graphic/Graphic.js:37–44  ·  view source on GitHub ↗

* @function OverlayGraphic.prototype.clone * @description 克隆当前要素。 * @returns {OverlayGraphic} 克隆后的要素。

()

Source from the content-addressed store, hash-verified

35 * @returns {OverlayGraphic} 克隆后的要素。
36 */
37 clone() {
38 var clone = new Graphic();
39 clone.setId(this.id);
40 clone.setGeometry(this.geometry_);
41 clone.setAttributes(this.attributes);
42 clone.setStyle(this.style_);
43 return clone;
44 }
45
46 /**
47 * @function OverlayGraphic.prototype.getId

Callers

nothing calls this directly

Calls 4

setIdMethod · 0.95
setGeometryMethod · 0.95
setAttributesMethod · 0.95
setStyleMethod · 0.95

Tested by

no test coverage detected