Feature : merge layers

Added feature to merge a layer with the layer below
Done at #jsconfeu2014 :)

New icon in icons : merge-icon.png
TODO : reorder the icons folder, it's waaaaaaay too messy !!
This commit is contained in:
juliandescottes
2014-09-13 20:10:05 +02:00
parent 90845b3a62
commit 4ed7338f25
9 changed files with 65 additions and 6 deletions

View File

@@ -73,6 +73,10 @@
this.layers.push(layer);
};
ns.Piskel.prototype.addLayerAt = function (layer, index) {
this.layers.splice(index, 0, layer);
};
ns.Piskel.prototype.moveLayerUp = function (layer) {
var index = this.layers.indexOf(layer);
if (index > -1 && index < this.layers.length-1) {