mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Layers:Review:Rename renderers frame up/down to above/below
This commit is contained in:
parent
4f754c6af2
commit
76511058d1
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
this.overlayRenderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["canvas-overlay"]);
|
this.overlayRenderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["canvas-overlay"]);
|
||||||
this.renderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["drawing-canvas"]);
|
this.renderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["drawing-canvas"]);
|
||||||
this.layersDownRenderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["layers-canvas", "layers-below-canvas"]);
|
this.layersBelowRenderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["layers-canvas", "layers-below-canvas"]);
|
||||||
this.layersUpRenderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["layers-canvas", "layers-above-canvas"]);
|
this.layersAboveRenderer = new pskl.rendering.FrameRenderer(this.container, renderingOptions, ["layers-canvas", "layers-above-canvas"]);
|
||||||
|
|
||||||
|
|
||||||
// State of drawing controller:
|
// State of drawing controller:
|
||||||
@ -38,8 +38,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ns.DrawingController.prototype.init = function () {
|
ns.DrawingController.prototype.init = function () {
|
||||||
// this.render();
|
|
||||||
|
|
||||||
this.initMouseBehavior();
|
this.initMouseBehavior();
|
||||||
|
|
||||||
$.subscribe(Events.TOOL_SELECTED, $.proxy(function(evt, toolBehavior) {
|
$.subscribe(Events.TOOL_SELECTED, $.proxy(function(evt, toolBehavior) {
|
||||||
@ -275,17 +273,17 @@
|
|||||||
|
|
||||||
var serialized = [currentFrameIndex, this.piskelController.currentLayerIndex, layers.length].join("-");
|
var serialized = [currentFrameIndex, this.piskelController.currentLayerIndex, layers.length].join("-");
|
||||||
if (this.serializedLayerFrame != serialized) {
|
if (this.serializedLayerFrame != serialized) {
|
||||||
this.layersUpRenderer.clear();
|
this.layersAboveRenderer.clear();
|
||||||
this.layersDownRenderer.clear();
|
this.layersBelowRenderer.clear();
|
||||||
|
|
||||||
var downLayers = layers.slice(0, currentLayerIndex);
|
var downLayers = layers.slice(0, currentLayerIndex);
|
||||||
var downFrame = this.getFrameForLayersAt_(currentFrameIndex, downLayers);
|
var downFrame = this.getFrameForLayersAt_(currentFrameIndex, downLayers);
|
||||||
this.layersDownRenderer.render(downFrame);
|
this.layersBelowRenderer.render(downFrame);
|
||||||
|
|
||||||
if (currentLayerIndex + 1 < layers.length) {
|
if (currentLayerIndex + 1 < layers.length) {
|
||||||
var upLayers = layers.slice(currentLayerIndex + 1, layers.length);
|
var upLayers = layers.slice(currentLayerIndex + 1, layers.length);
|
||||||
var upFrame = this.getFrameForLayersAt_(currentFrameIndex, upLayers);
|
var upFrame = this.getFrameForLayersAt_(currentFrameIndex, upLayers);
|
||||||
this.layersUpRenderer.render(upFrame);
|
this.layersAboveRenderer.render(upFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.serializedLayerFrame = serialized;
|
this.serializedLayerFrame = serialized;
|
||||||
@ -333,8 +331,8 @@
|
|||||||
this.overlayRenderer.updateDPI(dpi);
|
this.overlayRenderer.updateDPI(dpi);
|
||||||
this.renderer.updateDPI(dpi);
|
this.renderer.updateDPI(dpi);
|
||||||
|
|
||||||
this.layersUpRenderer.updateDPI(dpi);
|
this.layersAboveRenderer.updateDPI(dpi);
|
||||||
this.layersDownRenderer.updateDPI(dpi);
|
this.layersBelowRenderer.updateDPI(dpi);
|
||||||
this.serializedLayerFrame ="";
|
this.serializedLayerFrame ="";
|
||||||
|
|
||||||
var currentFrameHeight = this.piskelController.getCurrentFrame().getHeight();
|
var currentFrameHeight = this.piskelController.getCurrentFrame().getHeight();
|
||||||
|
Loading…
Reference in New Issue
Block a user