Merge branch 'master' into gh-pages

This commit is contained in:
juliandescottes 2012-09-06 01:10:40 +02:00
commit b1a26ad3df
2 changed files with 11 additions and 5 deletions

View File

@ -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 {

View File

@ -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;
} }