Skip to content

Commit

Permalink
采用删除svg而不是重置svg,重置svg会导致创建2个svg对象在DOM节点中
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Feb 27, 2013
1 parent 8bfea40 commit 9983533
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/charts/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
* @param {object} options options json object for determin line style.
*/
Line.prototype.render = function () {
this.canvas.clear();
this.canvas.remove();
this.createCanvas();
var conf = this.defaults;
var linesData = this.linesData;
Expand Down Expand Up @@ -419,7 +419,6 @@
var y = y0 - ((nodeData[j] - min) * yMatchNum);

linePath = linePath + x + "," + y;

if (j < l - 1) {
linePath = linePath + "L";
}
Expand Down Expand Up @@ -502,7 +501,6 @@
$(this.node).append(this.floatTag);
// if (hoverMode) {
// background.mouseover(function () {

// }).mouseout(function () {
// floatTag.css({"visibility" : "hidden"});
// });
Expand Down

0 comments on commit 9983533

Please sign in to comment.