diff --git a/src/chart/chord.js b/src/chart/chord.js index 82cb41c4068c3fd9788a346c075255f2b1d3e796..d75254ed23fa6b8807341a15d73c419e5eb9fc1d 100644 --- a/src/chart/chord.js +++ b/src/chart/chord.js @@ -296,10 +296,7 @@ define(function (require) { for (var i = 0; i < len; i++) { self.sectorShapes[i].style.opacity = i === idx ? 1 : 0.1; - self.zr.modShape( - self.sectorShapes[i].id, - self.sectorShapes[i] - ); + self.zr.modShape(self.sectorShapes[i].id); for (var j = 0; j < len; j++) { for (var k = 0; k < len2; k++) { @@ -308,7 +305,7 @@ define(function (require) { chordShape.style.opacity = (i === idx || j === idx) ? 0.5 : 0.03; - self.zr.modShape(chordShape.id, chordShape); + self.zr.modShape(chordShape.id); } } } @@ -326,14 +323,14 @@ define(function (require) { timeout = setTimeout(function (){ for (var i = 0; i < len; i++) { self.sectorShapes[i].style.opacity = 1.0; - self.zr.modShape(self.sectorShapes[i].id, self.sectorShapes[i]); + self.zr.modShape(self.sectorShapes[i].id); for (var j = 0; j < len; j++) { for (var k = 0; k < len2; k++) { var chordShape = self.chordShapes[i][j][k]; if (chordShape) { chordShape.style.opacity = 0.5; - self.zr.modShape(chordShape.id, chordShape); + self.zr.modShape(chordShape.id); } } } diff --git a/src/chart/force.js b/src/chart/force.js index ccaf8f518cca34bae032ad9d14c64aed40f9522c..683b2b11425c36cc54d1dbff18d9b8bf9c88dd3e 100644 --- a/src/chart/force.js +++ b/src/chart/force.js @@ -689,25 +689,25 @@ define(function (require) { _update(stepTime); _updateLinkShapes(); - var tmp = {}; + //var tmp = {}; for (var i = 0; i < nodeShapes.length; i++) { - var shape = nodeShapes[i]; - tmp.position = shape.position; - zr.modShape(shape.id, tmp, true); + //var shape = nodeShapes[i]; + //tmp.position = shape.position; + zr.modShape(nodeShapes[i].id); } - tmp = {}; + //tmp = {}; for (var i = 0; i < linkShapes.length; i++) { - var shape = linkShapes[i]; - tmp.style = shape.style; - zr.modShape(shape.id, tmp, true); + //var shape = linkShapes[i]; + //tmp.style = shape.style; + zr.modShape(linkShapes[i].id); } - tmp = {}; + //tmp = {}; for (var i = 0; i < arrowShapes.length; i++) { - var shape = arrowShapes[i]; - tmp.position = shape.position; - tmp.rotation = shape.rotation; - zr.modShape(shape.id, tmp, true); + //var shape = arrowShapes[i]; + //tmp.position = shape.position; + //tmp.rotation = shape.rotation; + zr.modShape(arrowShapes[i].id); } zr.refresh(); diff --git a/src/chart/island.js b/src/chart/island.js index 2f070ec9f44ae7024bf2f5be78c91a45529abd5e..15296ad5b259dbf6a4e88f500b8ab717e944c26e 100644 --- a/src/chart/island.js +++ b/src/chart/island.js @@ -62,7 +62,7 @@ define(function (require) { ecData.set(shape, 'value', value); ecData.set(shape, 'name', name); - self.zr.modShape(shape.id, shape); + self.zr.modShape(shape.id); self.zr.refresh(); zrEvent.stop(event); }; @@ -209,7 +209,7 @@ define(function (require) { var dragged = param.dragged; // 当前被拖拽的图形对象 _combine(target, dragged); - this.zr.modShape(target.id, target); + this.zr.modShape(target.id); status.dragIn = true; diff --git a/src/chart/map.js b/src/chart/map.js index f380cedf62d2352b45c6ffbbd0a4982ce0687d07..2e7ec68d9c06d110bc27def596d5b477bfa27e25 100644 --- a/src/chart/map.js +++ b/src/chart/map.js @@ -216,7 +216,6 @@ define(function (require) { ); self._buildMark(mt, ms); if (--self._mapDataRequireCounter <= 0) { - self._shapeListMap = {}; for (var i = 0, l = self.shapeList.length; i < l; i++) { self.zr.addShape(self.shapeList[i]); } @@ -1032,7 +1031,7 @@ define(function (require) { for (var i = 0, l = this.shapeList.length; i < l; i++) { if(this.shapeList[i]._mapType == this._curMapType) { this.shapeList[i].position = position; - this.zr.modShape(this.shapeList[i].id, mod, true); + this.zr.modShape(this.shapeList[i].id); } } @@ -1085,9 +1084,7 @@ define(function (require) { if (this.shapeList[i].style._text == p) { this.shapeList[i].style = this.shapeList[i]._style; - this.zr.modShape( - this.shapeList[i].id, this.shapeList[i] - ); + this.zr.modShape(this.shapeList[i].id); } } p != name && (this._selected[p] = false); @@ -1108,10 +1105,7 @@ define(function (require) { else { this.shapeList[i].style = this.shapeList[i]._style; } - this.zr.modShape( - this.shapeList[i].id, - {style : this.shapeList[i].style} - ); + this.zr.modShape(this.shapeList[i].id); } } @@ -1140,7 +1134,6 @@ define(function (require) { this._selected = {}; // 地图选择状态 this._mapTypeMap = {}; // 图例类型索引 this._mapDataMap = {}; // 根据地图类型索引bbox,transform,path - this._shapeListMap = {}; // 名字到shapeList关联映射 this._nameMap = {}; // 个性化地名 this._specialArea = {}; // 特殊 this._refreshDelayTicket; // 滚轮缩放时让refresh飞一会 diff --git a/src/component/dataRange.js b/src/component/dataRange.js index f1ed24561122412dc2e884bb7c068c6321aaea25..12fba10f88772cf5e3c9793253844c721bfed038 100644 --- a/src/component/dataRange.js +++ b/src/component/dataRange.js @@ -973,7 +973,7 @@ define(function (require) { this._fillerShae.style.height = height * (this._range.start - this._range.end) / 100; } - this.zr.modShape(this._fillerShae.id, this._fillerShae); + this.zr.modShape(this._fillerShae.id); this._syncHandleShape(); } } @@ -1096,7 +1096,7 @@ define(function (require) { this._gap * this._range.start + this.dataRangeOption.min ); - this.zr.modShape(this._startShape.id, this._startShape); + this.zr.modShape(this._startShape.id); this._endShape.position = [ this._endShape.style.x - this._endShape.style._x, this._endShape.style.y - this._endShape.style._y @@ -1114,12 +1114,12 @@ define(function (require) { this._endShape.style.color = this._endShape.highlightStyle.strokeColor = this.getColor( this._gap * this._range.end + this.dataRangeOption.min ); - this.zr.modShape(this._endShape.id, this._endShape); + this.zr.modShape(this._endShape.id); - this.zr.modShape(this._startMask.id, this._startMask); - this.zr.modShape(this._endMask.id, this._endMask); + this.zr.modShape(this._startMask.id); + this.zr.modShape(this._endMask.id); - needFiller && this.zr.modShape(this._fillerShae.id, this._fillerShae); + needFiller && this.zr.modShape(this._fillerShae.id); this.zr.refresh(); }, diff --git a/src/component/dataZoom.js b/src/component/dataZoom.js index be22e604d8cc49b3abfc2792992afe2f7e6d4dc3..1a8e9d25b01f4a94ec47858ff0706f172381a9d7 100644 --- a/src/component/dataZoom.js +++ b/src/component/dataZoom.js @@ -584,8 +584,8 @@ define(function (require) { ); } - this.zr.modShape(this._startShape.id, this._startShape); - this.zr.modShape(this._endShape.id, this._endShape); + this.zr.modShape(this._startShape.id); + this.zr.modShape(this._endShape.id); // 同步边框 this._syncFrameShape(); @@ -625,7 +625,7 @@ define(function (require) { ); } - this.zr.modShape(this._fillerShae.id, this._fillerShae); + this.zr.modShape(this._fillerShae.id); // 同步边框 this._syncFrameShape(); @@ -651,8 +651,8 @@ define(function (require) { this._location.y + this._location.height - this._endFrameShape.style.y; } - this.zr.modShape(this._startFrameShape.id, this._startFrameShape); - this.zr.modShape(this._endFrameShape.id, this._endFrameShape); + this.zr.modShape(this._startFrameShape.id); + this.zr.modShape(this._endFrameShape.id); }, _syncShape : function () { @@ -685,9 +685,9 @@ define(function (require) { - this._handleSize; } - this.zr.modShape(this._startShape.id, this._startShape); - this.zr.modShape(this._endShape.id, this._endShape); - this.zr.modShape(this._fillerShae.id, this._fillerShae); + this.zr.modShape(this._startShape.id); + this.zr.modShape(this._endShape.id); + this.zr.modShape(this._fillerShae.id); // 同步边框 this._syncFrameShape(); this.zr.refresh(); diff --git a/src/component/tooltip.js b/src/component/tooltip.js index 6020e678361378d967a122f2cc0771a6fedd6f42..adaffe4b72d34809ea2f7674aa60ad1903fa5bf7 100644 --- a/src/component/tooltip.js +++ b/src/component/tooltip.js @@ -177,12 +177,12 @@ define(function (require) { var needRefresh = false; if (!this._axisLineShape.invisible) { this._axisLineShape.invisible = true; - this.zr.modShape(this._axisLineShape.id, this._axisLineShape); + this.zr.modShape(this._axisLineShape.id); needRefresh = true; } if (!this._axisShadowShape.invisible) { this._axisShadowShape.invisible = true; - this.zr.modShape(this._axisShadowShape.id, this._axisShadowShape); + this.zr.modShape(this._axisShadowShape.id); needRefresh = true; } if (this._lastTipShape && this._lastTipShape.tipShape.length > 0) { @@ -948,7 +948,7 @@ define(function (require) { if (!this._axisLineShape.invisible) { this._axisLineShape.invisible = true; - this.zr.modShape(this._axisLineShape.id, this._axisLineShape); + this.zr.modShape(this._axisLineShape.id); this.zr.refresh(); } @@ -1035,7 +1035,7 @@ define(function (require) { lineType : lineType }; this._axisLineShape.invisible = false; - this.zr.modShape(this._axisLineShape.id, this._axisLineShape); + this.zr.modShape(this._axisLineShape.id); } else if (pointType == 'shadow') { if (typeof areaSize == 'undefined' @@ -1082,7 +1082,7 @@ define(function (require) { lineWidth : lineWidth }; this._axisShadowShape.invisible = false; - this.zr.modShape(this._axisShadowShape.id, this._axisShadowShape); + this.zr.modShape(this._axisShadowShape.id); } this.zr.refresh(); }