mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Shit merge
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
var Constants = {
|
var Constants = {
|
||||||
DEFAULT_PEN_COLOR : "#000000",
|
|
||||||
|
DEFAULT_PEN_COLOR : '#000000',
|
||||||
TRANSPARENT_COLOR : "TRANSPARENT",
|
TRANSPARENT_COLOR : "TRANSPARENT",
|
||||||
PISKEL_SERVICE_URL : "http://2.piskel-app.appspot.com"
|
PISKEL_SERVICE_URL: 'http://2.piskel-app.appspot.com'
|
||||||
};
|
};
|
@ -20,7 +20,7 @@ Events = {
|
|||||||
* TODO: Remove or rework when redraw system is refactored.
|
* TODO: Remove or rework when redraw system is refactored.
|
||||||
*/
|
*/
|
||||||
REFRESH: "REFRESH",
|
REFRESH: "REFRESH",
|
||||||
|
|
||||||
SHOW_NOTIFICATION: "SHOW_NOTIFICATION",
|
SHOW_NOTIFICATION: "SHOW_NOTIFICATION",
|
||||||
HIDE_NOTIFICATION: "HIDE_NOTIFICATION"
|
HIDE_NOTIFICATION: "HIDE_NOTIFICATION"
|
||||||
|
|
||||||
};
|
};
|
@ -33,4 +33,9 @@
|
|||||||
this.applyToolAt(col, row, frame, color, canvas, dpi);
|
this.applyToolAt(col, row, frame, color, canvas, dpi);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.Eraser.prototype.releaseToolAt = function(col, row, frame, color, canvas, dpi) {
|
||||||
|
// TODO: Create a afterRelease event hook or put that deep in the model
|
||||||
|
$.publish(Events.FRAMESHEET_UPDATED);
|
||||||
|
};
|
||||||
|
|
||||||
})();
|
})();
|
@ -21,12 +21,18 @@
|
|||||||
var targetColor = pskl.utils.normalizeColor(frame[col][row]);
|
var targetColor = pskl.utils.normalizeColor(frame[col][row]);
|
||||||
//this.recursiveFloodFill_(frame, col, row, targetColor, color);
|
//this.recursiveFloodFill_(frame, col, row, targetColor, color);
|
||||||
this.queueLinearFloodFill_(frame, col, row, targetColor, color);
|
this.queueLinearFloodFill_(frame, col, row, targetColor, color);
|
||||||
|
$.publish(Events.FRAMESHEET_UPDATED);
|
||||||
|
|
||||||
// Draw in canvas:
|
// Draw in canvas:
|
||||||
// TODO: Remove that when we have the centralized redraw loop
|
// TODO: Remove that when we have the centralized redraw loop
|
||||||
this.drawFrameInCanvas(frame, canvas, dpi);
|
this.drawFrameInCanvas(frame, canvas, dpi);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.PaintBucket.prototype.releaseToolAt = function(col, row, frame, color, canvas, dpi) {
|
||||||
|
// TODO: Create a afterRelease event hook or put that deep in the model
|
||||||
|
$.publish(Events.FRAMESHEET_UPDATED);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flood-fill (node, target-color, replacement-color):
|
* Flood-fill (node, target-color, replacement-color):
|
||||||
* 1. Set Q to the empty queue.
|
* 1. Set Q to the empty queue.
|
||||||
|
@ -84,6 +84,9 @@
|
|||||||
|
|
||||||
// For now, we are done with the stroke tool and don't need an overlay anymore:
|
// For now, we are done with the stroke tool and don't need an overlay anymore:
|
||||||
this.removeCanvasOverlays();
|
this.removeCanvasOverlays();
|
||||||
|
|
||||||
|
// TODO: Create a afterRelease event hook or put that deep in the model
|
||||||
|
$.publish(Events.FRAMESHEET_UPDATED);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,4 +52,9 @@
|
|||||||
this.previousCol = col;
|
this.previousCol = col;
|
||||||
this.previousRow = row;
|
this.previousRow = row;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.SimplePen.prototype.releaseToolAt = function(col, row, frame, color, canvas, dpi) {
|
||||||
|
// TODO: Create a afterRelease event hook or out that deep in the model
|
||||||
|
$.publish(Events.FRAMESHEET_UPDATED);
|
||||||
|
};
|
||||||
})();
|
})();
|
||||||
|
@ -97,6 +97,9 @@
|
|||||||
|
|
||||||
// For now, we are done with the stroke tool and don't need an overlay anymore:
|
// For now, we are done with the stroke tool and don't need an overlay anymore:
|
||||||
this.removeCanvasOverlays();
|
this.removeCanvasOverlays();
|
||||||
|
|
||||||
|
// TODO: Create a afterRelease event hook or out that deep in the model
|
||||||
|
$.publish(Events.FRAMESHEET_UPDATED);
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -96,7 +96,6 @@ $.namespace("pskl");
|
|||||||
// TODO: Move this into their service or behavior files:
|
// TODO: Move this into their service or behavior files:
|
||||||
this.initDrawingArea();
|
this.initDrawingArea();
|
||||||
this.initPreviewSlideshow();
|
this.initPreviewSlideshow();
|
||||||
this.initAnimationPreview();
|
|
||||||
this.startAnimation();
|
this.startAnimation();
|
||||||
|
|
||||||
pskl.ToolSelector.init();
|
pskl.ToolSelector.init();
|
||||||
|
Reference in New Issue
Block a user