mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix jscolor : add jscolor.install to Palette Controller init sequence. Fix layer canvas update on DPI change
This commit is contained in:
parent
50ca22d91a
commit
1bc73125dc
@ -333,6 +333,10 @@
|
||||
this.overlayRenderer.updateDPI(dpi);
|
||||
this.renderer.updateDPI(dpi);
|
||||
|
||||
this.layersUpRenderer.updateDPI(dpi);
|
||||
this.layersDownRenderer.updateDPI(dpi);
|
||||
this.serializedLayerFrame ="";
|
||||
|
||||
var currentFrameHeight = this.piskelController.getCurrentFrame().getHeight();
|
||||
var canvasHeight = currentFrameHeight * dpi;
|
||||
if (pskl.UserSettings.get(pskl.UserSettings.SHOW_GRID)) {
|
||||
|
@ -28,6 +28,7 @@
|
||||
secondaryColorPicker.val(Constants.TRANSPARENT_COLOR);
|
||||
secondaryColorPicker.change({isPrimary : false}, $.proxy(this.onPickerChange_, this));
|
||||
|
||||
window.jscolor.install();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,7 @@
|
||||
this.currentLayerIndex = 0;
|
||||
this.currentFrameIndex = 0;
|
||||
|
||||
this.layerIdCounter = 0;
|
||||
this.layerIdCounter = 1;
|
||||
|
||||
$.publish(Events.FRAMESHEET_RESET);
|
||||
$.publish(Events.FRAME_SIZE_CHANGED);
|
||||
|
@ -20,7 +20,11 @@ var jscolor = {
|
||||
|
||||
|
||||
install : function() {
|
||||
jscolor.addEvent(window, 'load', jscolor.init);
|
||||
if (document.readyState === "complete") {
|
||||
jscolor.init();
|
||||
} else {
|
||||
jscolor.addEvent(window, 'load', jscolor.init);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -921,6 +925,3 @@ var jscolor = {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
jscolor.install();
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
ns.FrameRenderer.prototype.render = function (frame) {
|
||||
if (frame) {
|
||||
this.clear(frame);
|
||||
this.clear();
|
||||
var context = this.getCanvas_(frame).getContext('2d');
|
||||
for(var col = 0, width = frame.getWidth(); col < width; col++) {
|
||||
for(var row = 0, height = frame.getHeight(); row < height; row++) {
|
||||
|
Loading…
Reference in New Issue
Block a user