* @function Graphic.prototype.setGraphics * @description 设置绘制的点要素,会覆盖之前的所有要素。 * @param {Array. } graphics - 点要素对象数组。
(graphics)
| 270 | * @param {Array.<OverlayGraphic>} graphics - 点要素对象数组。 |
| 271 | */ |
| 272 | setGraphics(graphics) { |
| 273 | this.graphics = this.graphics || []; |
| 274 | this.graphics.length = 0; |
| 275 | let sGraphics = !Util.isArray(graphics) ? [graphics] : [].concat(graphics); |
| 276 | this.graphics = [].concat(sGraphics); |
| 277 | this.update(); |
| 278 | } |
| 279 | |
| 280 | /** |
| 281 | * @function Graphic.prototype.addGraphics |
no test coverage detected