From b2babd9502c070ab677872d9d83a3ddac716a593 Mon Sep 17 00:00:00 2001 From: Xaver Date: Tue, 19 Dec 2023 16:52:15 +0100 Subject: [PATCH] inline iro.js and rangetouch.js --- wled00/data/index.htm | 46 +++---------------------------------------- wled00/data/index.js | 16 ++++++++++++++- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 8dd26b7b7..fead9f1ba 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -7,49 +7,7 @@ WLED - + @@ -378,6 +336,8 @@
+ + diff --git a/wled00/data/index.js b/wled00/data/index.js index 3fed6d20e..9b4d0f0af 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -15,6 +15,7 @@ var pcMode = false, pcModeA = false, lastw = 0, wW; var simplifiedUI = false; var tr = 7; var d = document; +const ranges = RangeTouch.setup('input[type="range"]', {}); var palettesData; var fxdata = []; var pJson = {}, eJson = {}, lJson = {}; @@ -23,7 +24,7 @@ var pN = "", pI = 0, pNum = 0; var pmt = 1, pmtLS = 0, pmtLast = 0; var lastinfo = {}; var isM = false, mw = 0, mh=0; -var ws, cpick, ranges, wsRpt=0; +var ws, cpick, wsRpt=0; var cfg = { theme:{base:"dark", bg:{url:"", rnd: false, rndGrayscale: false, rndBlur: false}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}}, comp :{colors:{picker: true, rgb: false, quick: true, hex: false}, @@ -39,6 +40,19 @@ var hol = [ [0,0,1,1,"https://images.alphacoders.com/119/1198800.jpg"] // new year ]; +cpick = new iro.ColorPicker("#picker", { + width: 260, + wheelLightness: false, + wheelAngle: 270, + wheelDirection: "clockwise", + layout: [{ + component: iro.ui.Wheel, + options: {} + }] +}); +cpick.on("input:end", () => {setColor(1);}); +cpick.on("color:change", () => {updatePSliders()}); + function handleVisibilityChange() {if (!d.hidden && new Date () - lastUpdate > 3000) requestJson();} function sCol(na, col) {d.documentElement.style.setProperty(na, col);} function gId(c) {return d.getElementById(c);}