Set color of Alpha icon based on opacity value.

This commit is contained in:
Zakar Handricken 2018-09-15 16:45:57 -04:00 committed by Julian Descottes
parent ba0e86dc7e
commit 6e84f0a2b5

View File

@ -130,6 +130,14 @@
layerNameEl.setAttribute('title', layer.getName()); layerNameEl.setAttribute('title', layer.getName());
layerNameEl.setAttribute('rel', 'tooltip'); layerNameEl.setAttribute('rel', 'tooltip');
} }
var opacity = layer.getOpacity();
if (opacity == 1) {
layerItem.querySelector('.layer-item-opacity').style.color = '#ffd700';
} else if (opacity == 0) {
layerItem.querySelector('.layer-item-opacity').style.color = '#969696';
} else {
layerItem.querySelector('.layer-item-opacity').style.color = '#ffffff';
}
}; };
ns.LayersListController.prototype.onClick_ = function (evt) { ns.LayersListController.prototype.onClick_ = function (evt) {