提交 879fd61e 编写于 作者: C Catouse

* fixed clearCanvasArea.

上级 be4855a8
......@@ -5410,7 +5410,6 @@ Date.prototype.format = function(format)
if(nodeData.type === 'root')
{
this.clearCanvasArea();
ui.left = 0 - Math.floor(ui.width / 2);
ui.top = 0 - Math.floor(ui.height / 2);
......@@ -5561,8 +5560,7 @@ Date.prototype.format = function(format)
Mindmap.prototype.clearCanvasArea = function(nodeData, parent)
{
var size = this.options.canvasSize;
this.$canvas[0].getContext("2d").clearRect(0, 0, size.width, size.height)
this.$canvas[0].getContext("2d").clearRect(0, 0, this.width, this.height)
};
Mindmap.prototype.draw = function(nodeData, parent)
......@@ -5575,6 +5573,7 @@ Date.prototype.format = function(format)
if(nodeData.type === 'root')
{
this.$canvas.attr({width: this.width, height: this.height});
this.clearCanvasArea();
}
if(parent)
......
......@@ -622,7 +622,6 @@
if(nodeData.type === 'root')
{
this.clearCanvasArea();
ui.left = 0 - Math.floor(ui.width / 2);
ui.top = 0 - Math.floor(ui.height / 2);
......@@ -773,8 +772,7 @@
Mindmap.prototype.clearCanvasArea = function(nodeData, parent)
{
var size = this.options.canvasSize;
this.$canvas[0].getContext("2d").clearRect(0, 0, size.width, size.height)
this.$canvas[0].getContext("2d").clearRect(0, 0, this.width, this.height)
};
Mindmap.prototype.draw = function(nodeData, parent)
......@@ -787,6 +785,7 @@
if(nodeData.type === 'root')
{
this.$canvas.attr({width: this.width, height: this.height});
this.clearCanvasArea();
}
if(parent)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册