fix logCanvasAttributes error (#863)
This commit is contained in:
parent
e49e5c258a
commit
de16420796
1 changed files with 2 additions and 1 deletions
|
@ -134,10 +134,11 @@ const Util = {
|
||||||
.render(new Parser().parse(text))
|
.render(new Parser().parse(text))
|
||||||
},
|
},
|
||||||
logCanvasAttributes: function(canvas){
|
logCanvasAttributes: function(canvas){
|
||||||
|
const fakeMgraph = { canvas }
|
||||||
return {
|
return {
|
||||||
scaleX: canvas.scaleOffsetX,
|
scaleX: canvas.scaleOffsetX,
|
||||||
scaleY: canvas.scaleOffsetY,
|
scaleY: canvas.scaleOffsetY,
|
||||||
centreCoords: Util.pixelsToCoords({ x: canvas.canvases[0].size.width / 2, y: canvas.canvases[0].size.height / 2 }),
|
centreCoords: Util.pixelsToCoords(fakeMgraph, { x: canvas.canvases[0].size.width / 2, y: canvas.canvases[0].size.height / 2 }),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
resizeCanvas: function(canvas){
|
resizeCanvas: function(canvas){
|
||||||
|
|
Loading…
Reference in a new issue