Remove jquery from ColorsList.js

This commit is contained in:
Julian Descottes 2018-04-08 16:51:51 +02:00
parent 4836251bd3
commit e5e85f67c2

View File

@ -139,7 +139,8 @@
var colorElement = drop.item.get(0); var colorElement = drop.item.get(0);
var oldIndex = parseInt(colorElement.dataset.paletteIndex, 10); var oldIndex = parseInt(colorElement.dataset.paletteIndex, 10);
var newIndex = $('.create-palette-color').index(drop.item); var colors = document.querySelectorAll('.create-palette-color');
var newIndex = Array.prototype.indexOf.call(colors, colorElement);
this.palette.move(oldIndex, newIndex); this.palette.move(oldIndex, newIndex);
this.selectedIndex = newIndex; this.selectedIndex = newIndex;