Skip to content

Commit

Permalink
Fix bug caused by changing markLine fromSymbol or toSymbol.
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Mar 4, 2016
1 parent d1d567a commit 3b9497f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/chart/helper/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ define(function (require) {
symbolFrom.attr('position', fromPos);
// Rotate the arrow
// FIXME Hard coded ?
if (isSymbolArrow(symbolTo)) {
symbolTo.attr('rotation', tangentRotation(fromPos, toPos));
if (isSymbolArrow(symbolFrom)) {
symbolFrom.attr('rotation', tangentRotation(toPos, fromPos));
}
}
if (symbolTo) {
symbolTo.attr('position', toPos);
if (isSymbolArrow(symbolFrom)) {
symbolFrom.attr('rotation', tangentRotation(toPos, fromPos));
if (isSymbolArrow(symbolTo)) {
symbolTo.attr('rotation', tangentRotation(fromPos, toPos));
}
}

Expand Down Expand Up @@ -199,7 +199,7 @@ define(function (require) {
var fromSymbolType = fromData.getItemVisual(idx, 'symbol');
if (this._fromSymbolType !== fromSymbolType) {
var symbolFrom = createSymbol('fromSymbol', fromData, idx);
this.remove(line.childOfName('fromSymbol'));
this.remove(this.childOfName('fromSymbol'));
this.add(symbolFrom);
}
this._fromSymbolType = fromSymbolType;
Expand All @@ -209,7 +209,7 @@ define(function (require) {
// Symbol changed
if (toSymbolType !== this._toSymbolType) {
var symbolTo = createSymbol('toSymbol', toData, idx);
this.remove(line.childOfName('toSymbol'));
this.remove(this.childOfName('toSymbol'));
this.add(symbolTo);
}
this._toSymbolType = toSymbolType;
Expand Down
4 changes: 3 additions & 1 deletion src/chart/map/MapSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ define(function (require) {

mergeOption: function (newOption) {
newOption = this._fillOption(newOption);
SeriesModel.prototype.mergeOption.call(this, newOption);

MapSeries.superCall(this, 'mergeOption', newOption);

this.updateSelectedMap();
},

Expand Down
7 changes: 0 additions & 7 deletions src/chart/themeRiver/ThemeRiverSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ define(function (require) {
};
},

/**
* @override
*/
mergeOption: function (newOption) {
ThemeRiverSeries.superCall(this, 'mergeOption', newOption);
},

/**
* If there is no value of a certain point in the time for some event,set it value to 0.
*
Expand Down

0 comments on commit 3b9497f

Please sign in to comment.