From 8ad11762e071a9b874be106e495831968e8c2035 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Mon, 19 Sep 2022 05:03:43 +0200 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B0=D0=B3=D0=B0=20ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.svelte | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 93082a2..a208745 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -39,12 +39,12 @@ let updatingTimeout = 120000; let opened = false; let preventMove = false; - let devMode = false; + let devMode = true; //****************************************************variable section**********************************************************/ //******************************************************************************************************************************/ let myip = document.location.hostname; - if (devMode) myip = "192.168.1.116"; + if (devMode) myip = "192.168.88.253"; //Flags let firstDevListRequest = true; @@ -517,6 +517,9 @@ reader.onload = () => { let devLayout = JSON.parse(reader.result); + for (let i = 0; i < devLayout.length; i++) { + devLayout[i].ws = ws; + } layoutJson = layoutJson.concat(devLayout); console.log("[2]", ws, "blob package pushed to layout"); sortingLayout(); @@ -567,7 +570,7 @@ for (let i = 0; i < layoutJson.length; i++) { let topic = layoutJson[i].topic; if (topic) { - layoutJson[i].ws = ws; + //layoutJson[i].ws = ws; topic = topic.substring(topic.lastIndexOf("/") + 1, topic.length); if (key === topic) { console.log("[i]", "updated =>" + topic, value); @@ -827,7 +830,7 @@ function wsPush(ws, topic, status) { let msg = topic + " " + status; if (debug) console.log("[i]", "ws: ", ws, msg); - layoutJson = layoutJson; + //layoutJson = layoutJson; let key = topic.substring(topic.lastIndexOf("/") + 1, topic.length); wsSendMsg(ws, "/control|" + key + "/" + status); }