diff --git a/web_realart/public/control/control.css b/web_realart/public/control/control.css index d25ede6..5e478a9 100644 --- a/web_realart/public/control/control.css +++ b/web_realart/public/control/control.css @@ -165,10 +165,6 @@ button.queued { animation: queued-blink 600ms ease-in-out infinite alternate; } .cd-colorsel { display:flex; gap:4px; margin:6px 0; } .cd-colorsel button.on { outline:2px solid #fff; } .cd-pattern { display:flex; flex-direction:column; gap:6px; } -.cd-tabs { display:flex; gap:4px; margin:6px 0; } -.cd-tab { width: auto; padding: 6px 10px; font-size: 12px; } -.cd-tab.on { background:#2b6; color:#fff; } -.cd-pane[hidden] { display:none; } .cd-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 50; } .cd-modal[hidden] { display: none; } diff --git a/web_realart/public/control/control.js b/web_realart/public/control/control.js index e5430e1..54c0a7f 100644 --- a/web_realart/public/control/control.js +++ b/web_realart/public/control/control.js @@ -265,7 +265,7 @@ ws.addEventListener("message", (ev) => { } if (address === "/matrix/colormod") { const vi=Math.round(Number(args[0])), c=Math.round(Number(args[1])); - if (vi>=0&&vi<16&&c>=1&&c<=6) { + if (vi>=0&&vi<16&&c>=1&&c<=6&&matColorDefs[vi][c]) { const src=String(args[2]??"none"); matColorDefs[vi][c].mod = (src==="none") ? null : {source:src, target:String(args[3]??"none"), depth:Number(args[4])||0}; saveMatState(); @@ -275,7 +275,7 @@ ws.addEventListener("message", (ev) => { } if (address === "/matrix/colorpose") { const vi=Math.round(Number(args[0])), c=Math.round(Number(args[1])), n=Math.round(Number(args[2])); - if (vi>=0&&vi<16&&c>=1&&c<=6) { + if (vi>=0&&vi<16&&c>=1&&c<=6&&matColorDefs[vi][c]) { matColorDefs[vi][c].pose = []; for (let k=0;k