Is there a way to replace layer background with some other e.g. background_day and background_night?
I have not the best solution but working. I've added on layout 1 image with additional class 'day' and without any background. I've also added to Custom javascript little code which change the path to night image when GA 0/0/20 has value == false.
I have not the best solution but working. I've added on layout 1 image with additional class 'day' and without any background. I've also added to Custom javascript little code which change the path to night image when GA 0/0/20 has value == false.
Code:
// Day/Night background change
$(function(){
grp.listen('0/0/20', function(obj, type) {
var plans = $('.day')[0]
if (obj.value == true) {plans.innerHTML = '<img src="/scada/resources/img/Day.jpg?1465541682">';} else {plans.innerHTML = '<img src="/scada/resources/img/Night.jpg?1465541682">';}
}, true);
});