mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed new pixel creation bug and preview canvas blurriness
It's now possible to create a new project of a different size from the one decided when opening the app. Also fixed a bug that made the layer preview canvases blurry. They're now pixel perfect.
This commit is contained in:
@@ -118,9 +118,6 @@ class Layer {
|
||||
|
||||
if (menuEntry != null) {
|
||||
menuEntry.id = "layer" + id;
|
||||
}
|
||||
|
||||
if (menuEntry != null) {
|
||||
menuEntry.onclick = () => this.select();
|
||||
menuEntry.getElementsByTagName("button")[0].onclick = () => this.toggleLock();
|
||||
menuEntry.getElementsByTagName("button")[1].onclick = () => this.toggleVisibility();
|
||||
@@ -130,6 +127,8 @@ class Layer {
|
||||
menuEntry.addEventListener("dragover", this.layerDragOver, false);
|
||||
menuEntry.addEventListener("dragleave", this.layerDragLeave, false);
|
||||
menuEntry.addEventListener("dragend", this.layerDragEnd, false);
|
||||
|
||||
menuEntry.getElementsByTagName("canvas")[0].getContext('2d').imageSmoothingEnabled = false;
|
||||
}
|
||||
|
||||
this.initialize();
|
||||
|
Reference in New Issue
Block a user