This commit is contained in:
juliandescottes
2017-02-04 13:49:20 +01:00
3 changed files with 27 additions and 2 deletions

View File

@@ -100,7 +100,7 @@
ns.PalettesListController.prototype.getCurrentColorIndex_ = function () {
var currentIndex = 0;
var selectedColor = document.querySelector('.' + PRIMARY_COLOR_CLASSNAME);
if (selectedColor) {
if (selectedColor) {
currentIndex = parseInt(selectedColor.dataset.colorIndex, 10);
}
return currentIndex;

View File

@@ -87,7 +87,7 @@
if (background) {
pskl.UserSettings.set(pskl.UserSettings.CANVAS_BACKGROUND, background);
var selected = this.backgroundContainer.querySelector('.selected');
if (selected) {
if (selected) {
selected.classList.remove('selected');
}
target.classList.add('selected');