diff --git a/src/css/tabs/led_strip.css b/src/css/tabs/led_strip.css index 9fda8e3f..ac29ee16 100644 --- a/src/css/tabs/led_strip.css +++ b/src/css/tabs/led_strip.css @@ -239,13 +239,13 @@ display: inline-block; position: absolute; z-index: 10000; - background: white; + background: var(--boxBackground); padding: 5px; - margin: 10px; border-color: #565656; border-style: solid; border-radius: 6px; border-width: 2px; + width: 167px; } .tab-led-strip .color-1 {background: white;} @@ -346,7 +346,6 @@ position: relative; float: left; width: 285px; - margin-right: 10px; } .colorDefineSliderValue, diff --git a/src/js/tabs/led_strip.js b/src/js/tabs/led_strip.js index 5ab88647..c8ee096a 100644 --- a/src/js/tabs/led_strip.js +++ b/src/js/tabs/led_strip.js @@ -265,22 +265,10 @@ TABS.led_strip.initialize = function (callback, scrollPosition) { updateBulkCmd(); }); - $('.colors').on('dblclick', 'button', function(e) { - - var pp = $('.tab-led-strip').position(); - var moveLeft = $('.tab-led-strip').position().left + ($('.colorDefineSliders').width() / 2); - var moveUp = $('.tab-led-strip').position().top + $('.colorDefineSliders').height() + 20; - - $('.colorDefineSliders').css('left', e.pageX - e.offsetX - moveLeft); - $('.colorDefineSliders').css('top', e.pageY - e.offsetY - moveUp); + $('.colors').on('dblclick', 'button', function() { + $('.colorDefineSliders').css('left', $(this).position().left - $('.colorDefineSliders').width() / 2 + $(this).width()); + $('.colorDefineSliders').css('top', $(this).position().top + 26); $('.colorDefineSliders').show(); - - }); - - $('.colorDefineSliders').on({ - mouseleave: function () { - $('.colorDefineSliders').hide(); - } }); $('.colors').children().on({ diff --git a/src/tabs/led_strip.html b/src/tabs/led_strip.html index 38015195..e367a240 100644 --- a/src/tabs/led_strip.html +++ b/src/tabs/led_strip.html @@ -26,24 +26,6 @@
-
-
-
- - - -
-
- - - -
-
- - - -
-
@@ -158,6 +140,24 @@
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+