feature/layout-updates #1
@ -4,6 +4,7 @@ import * as TW from "./twind.js";
|
|||||||
import * as UI from "./ui.js";
|
import * as UI from "./ui.js";
|
||||||
import * as Store from "./store.js";
|
import * as Store from "./store.js";
|
||||||
|
|
||||||
|
// @ts-ignore:
|
||||||
const ShadowDOM = document.querySelector("#app").attachShadow({mode: "open"});
|
const ShadowDOM = document.querySelector("#app").attachShadow({mode: "open"});
|
||||||
const ShadowDiv = document.createElement("div");
|
const ShadowDiv = document.createElement("div");
|
||||||
const ShadowCSS = document.createElement("style");
|
const ShadowCSS = document.createElement("style");
|
||||||
|
@ -114,18 +114,19 @@ export function Reducer(inState, inAction)
|
|||||||
const key = clone.Chan.Value == 0 ? "UserL" : "UserR";
|
const key = clone.Chan.Value == 0 ? "UserL" : "UserR";
|
||||||
clone.Live.Mark = Data !== null ? {Stim:clone.Stim.Value, Resp:Data} : undefined;
|
clone.Live.Mark = Data !== null ? {Stim:clone.Stim.Value, Resp:Data} : undefined;
|
||||||
clone.Live.Freq[key] = clone.Live.Mark;
|
clone.Live.Freq[key] = clone.Live.Mark;
|
||||||
clone.Live.Freq = {...clone.Live.Freq};
|
|
||||||
clone.Draw[key] = Redraw(clone.Live.Test, clone.Chan.Value, clone.Stim, true);
|
clone.Draw[key] = Redraw(clone.Live.Test, clone.Chan.Value, clone.Stim, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( Name=="Stim" || Name=="Chan" || Name=="Freq")
|
else if( Name=="Stim" || Name=="Chan" || Name=="Freq")
|
||||||
{
|
{
|
||||||
const tone = {...clone[Name]};
|
const tone = clone[Name];
|
||||||
tone.Value += Data*tone.Step;
|
tone.Value += Data*tone.Step;
|
||||||
tone.Value = Math.max(tone.Value, tone.Min);
|
tone.Value = Math.max(tone.Value, tone.Min);
|
||||||
tone.Value = Math.min(tone.Value, tone.Max);
|
tone.Value = Math.min(tone.Value, tone.Max);
|
||||||
clone[Name] = tone;
|
if(Name != "Stim")
|
||||||
clone.Live = Reselect(clone);
|
{
|
||||||
|
clone.Live = Reselect(clone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
|
@ -8,6 +8,7 @@ export const Configure = {
|
|||||||
{
|
{
|
||||||
extend:
|
extend:
|
||||||
{
|
{
|
||||||
|
// @ts-ignore: typings for keyframes are missing in twind
|
||||||
keyframes:
|
keyframes:
|
||||||
{
|
{
|
||||||
flash:
|
flash:
|
||||||
|
Loading…
Reference in New Issue
Block a user