mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Bug : current layer index was a string
This commit is contained in:
parent
39d7d4d8c8
commit
dd4a544d7a
@ -37,14 +37,14 @@
|
||||
ns.LayersListController.prototype.onClick_ = function (evt) {
|
||||
var el = evt.target || evt.srcElement;
|
||||
var index;
|
||||
if (el.nodeName == 'BUTTON') {
|
||||
if (el.classList.contains('button')) {
|
||||
this.onButtonClick_(el);
|
||||
} else if (el.classList.contains('layer-item')) {
|
||||
index = el.dataset.layerIndex;
|
||||
this.piskelController.setCurrentLayerIndex(index);
|
||||
this.piskelController.setCurrentLayerIndex(parseInt(index, 10));
|
||||
} else if (el.classList.contains('edit-icon')) {
|
||||
index = el.parentNode.dataset.layerIndex;
|
||||
var layer = this.piskelController.getLayerByIndex(index);
|
||||
var layer = this.piskelController.getLayerByIndex(parseInt(index, 10));
|
||||
this.renameLayer_(layer);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user