mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Changed main-canvas to drawing-canvas
This commit is contained in:
parent
1de9ee41b2
commit
53436009e3
|
@ -127,7 +127,7 @@ ul, li {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.canvas-main {
|
.drawing-canvas {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
ns.DrawingController.prototype.createMainCanvas = function () {
|
ns.DrawingController.prototype.createMainCanvas = function () {
|
||||||
var mainCanvas = this.createCanvas();
|
var mainCanvas = this.createCanvas();
|
||||||
mainCanvas.className = "canvas-main";
|
mainCanvas.className = "drawing-canvas";
|
||||||
this.container.appendChild(mainCanvas);
|
this.container.appendChild(mainCanvas);
|
||||||
return mainCanvas;
|
return mainCanvas;
|
||||||
};
|
};
|
||||||
|
|
|
@ -263,7 +263,7 @@ $.namespace("pskl");
|
||||||
},
|
},
|
||||||
|
|
||||||
getRelativeCoordinates : function (x, y) {
|
getRelativeCoordinates : function (x, y) {
|
||||||
var canvasRect = $(".canvas-main")[0].getBoundingClientRect();
|
var canvasRect = $(".drawing-canvas")[0].getBoundingClientRect();
|
||||||
return {
|
return {
|
||||||
x : x - canvasRect.left,
|
x : x - canvasRect.left,
|
||||||
y : y - canvasRect.top
|
y : y - canvasRect.top
|
||||||
|
|
Loading…
Reference in New Issue
Block a user