From cac6c63752e4d1bee77d7a7c8cd858758322b268 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Tue, 15 Dec 2015 13:50:26 +1000 Subject: [PATCH] Fix xmas UI for relative installs --- css/hues-x.css | 13 +++++++++---- js/HuesUI.js | 6 ++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/css/hues-x.css b/css/hues-x.css index 2d4c553..615ceff 100644 --- a/css/hues-x.css +++ b/css/hues-x.css @@ -32,21 +32,26 @@ background-image: url("../img/lightbase.png"); } -.hues-x-light > div > img { - position: absolute; -} - .hues-x-fade{ transition: opacity 0.1s linear; -webkit-transition: opacity 0.1s linear; } +.hues-x-lighton, .hues-x-lightoff { + position: absolute; + width: 68px; + height: 113px; + background-repeat: no-repeat; +} + .hues-x-lighton { opacity: 1; + background-image: url("../img/lighton.png"); } .hues-x-lightoff { opacity: 0; + background-image: url("../img/lightoff.png"); } .hues-x-lighton.off{ diff --git a/js/HuesUI.js b/js/HuesUI.js index e463f24..46f208b 100644 --- a/js/HuesUI.js +++ b/js/HuesUI.js @@ -899,10 +899,8 @@ XmasUI.prototype.newLight = function(l, parent) { var light = document.createElement("div"); light.className = "hues-x-light"; var bulb = document.createElement("div"); - var on = document.createElement("img"); - on.src = "./img/lighton.png"; - var off = document.createElement("img"); - off.src = "./img/lightoff.png"; + var on = document.createElement("div"); + var off = document.createElement("div"); bulb.appendChild(on); bulb.appendChild(off); light.appendChild(bulb);