mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
b1a26ad3df
@ -49,19 +49,19 @@
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
.tool-paint-bucket .drawing-canvas-container:hover {
|
.tool-paint-bucket .drawing-canvas-container:hover {
|
||||||
cursor: url(../img/tools/cursors/paint-bucket.png) 18 17, pointer;
|
cursor: url(../img/tools/cursors/paint-bucket.png) 14 12, pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-pen .drawing-canvas-container:hover {
|
.tool-pen .drawing-canvas-container:hover {
|
||||||
cursor: url(../img/tools/cursors/pen.png) 7 21, pointer;
|
cursor: url(../img/tools/cursors/pen.png) 2 21, pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-eraser .drawing-canvas-container:hover {
|
.tool-eraser .drawing-canvas-container:hover {
|
||||||
cursor: url(../img/tools/cursors/eraser.png) 5 21, pointer;
|
cursor: url(../img/tools/cursors/eraser.png) 2 21, pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-stroke .drawing-canvas-container:hover {
|
.tool-stroke .drawing-canvas-container:hover {
|
||||||
cursor: url(../img/tools/cursors/pen.png) 5 21, pointer;
|
cursor: url(../img/tools/cursors/pen.png) 2 21, pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-rectangle .drawing-canvas-container:hover {
|
.tool-rectangle .drawing-canvas-container:hover {
|
||||||
|
@ -212,8 +212,9 @@ $.namespace("pskl");
|
|||||||
var currentTime = new Date().getTime();
|
var currentTime = new Date().getTime();
|
||||||
// Throttling of the mousemove event:
|
// Throttling of the mousemove event:
|
||||||
if ((currentTime - previousMousemoveTime) > 40 ) {
|
if ((currentTime - previousMousemoveTime) > 40 ) {
|
||||||
|
var spriteCoordinate = this.getSpriteCoordinate(event);
|
||||||
if (isClicked) {
|
if (isClicked) {
|
||||||
var spriteCoordinate = this.getSpriteCoordinate(event);
|
|
||||||
currentToolBehavior.moveToolAt(
|
currentToolBehavior.moveToolAt(
|
||||||
spriteCoordinate.col,
|
spriteCoordinate.col,
|
||||||
spriteCoordinate.row,
|
spriteCoordinate.row,
|
||||||
@ -225,6 +226,11 @@ $.namespace("pskl");
|
|||||||
// Eg when drawing, it may make sense to have it here. However for a non drawing tool,
|
// Eg when drawing, it may make sense to have it here. However for a non drawing tool,
|
||||||
// you don't need to draw anything when mousemoving and you request useless localStorage.
|
// you don't need to draw anything when mousemoving and you request useless localStorage.
|
||||||
$.publish(Events.LOCALSTORAGE_REQUEST);
|
$.publish(Events.LOCALSTORAGE_REQUEST);
|
||||||
|
} else {
|
||||||
|
// debug mode to see the selected pixel
|
||||||
|
// this.drawingController.clearOverlay();
|
||||||
|
// this.drawingController.overlay.setPixel( spriteCoordinate.col,spriteCoordinate.row, "#ff0000");
|
||||||
|
// this.drawingController.renderOverlay();
|
||||||
}
|
}
|
||||||
previousMousemoveTime = currentTime;
|
previousMousemoveTime = currentTime;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user