diff --git a/client/style.css b/client/style.css index 4c3c94d6b1b5dc9b8b22b1b21d74bce30ae65605..af472f19fae46dd9a8241212ac05e4c9a4d1298b 100644 --- a/client/style.css +++ b/client/style.css @@ -123,4 +123,8 @@ li:active{ width: 80px; padding: 3px; background-color: #303030; +} + +#nav { + font-size: 15px; } \ No newline at end of file diff --git a/modules/util/delay.js b/modules/util/delay.js index abf1b6fa6ce81b7dce81e941ed812151eb40bd86..fd7b9f06b7cd7b7ce3088b74baae2a7c28f0a2dc 100644 --- a/modules/util/delay.js +++ b/modules/util/delay.js @@ -32,8 +32,8 @@ function Delay() { } function onMsChange(){ + // a test fn console.log("noting state change", state.ms) - state.ms = 1200 } function onDelayBegin(input){ diff --git a/programs.js b/programs.js index 9221b386037f741a39f214c966c88cffe0866a7a..369a8f0a615ee7cb10e7f6f9d3e770d3fe98f1ae 100644 --- a/programs.js +++ b/programs.js @@ -200,10 +200,10 @@ function openProgram(path) { // restoring state for (key in mdlRep.state) { if (isStateKey(key)) { - console.log("STATE - NEEDS WORK", key) - // want to do this without asserting the change though - // actually, if new paradigm, we don't call .onChange - // rename .onChange for 'onUiChange' or something + // I think this is OK? + // would prefer to do this before we write getters and setters + // for now we walk-around to secret key ... + mdl.state['_' + key] = mdlRep.state[key] } } diff --git a/programs/dflt2.json b/programs/dflt2.json new file mode 100644 index 0000000000000000000000000000000000000000..4a802674706e90412f60da83dd201012019c56bc --- /dev/null +++ b/programs/dflt2.json @@ -0,0 +1,102 @@ +{ + "description": { + "name": "tstprgmem", + "counter": 3 + }, + "modules": { + "gate-1": { + "description": { + "id": "gate-1", + "name": "gate", + "alt": "in ... out", + "path": "./modules/util/gate.js", + "position": { + "left": 10, + "top": 30 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "any", + "calls": [ + { + "parentId": "delay-2", + "key": "thru" + } + ] + } + }, + "state": { + "toggle": { + "type": "button", + "isPressed": false, + "label": "Open / Close" + }, + "message": "closed" + } + }, + "delay-2": { + "description": { + "id": "delay-2", + "name": "delay", + "alt": "in ... out", + "path": "./modules/util/delay.js", + "position": { + "left": 132, + "top": 225 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "out": { + "emits": "any", + "calls": [ + { + "parentId": "logger-3", + "key": "thru" + } + ] + } + }, + "state": { + "ms": 1200 + } + }, + "logger-3": { + "description": { + "id": "logger-3", + "name": "logger", + "alt": "in ... out to console", + "path": "./modules/util/log.js", + "position": { + "left": 123, + "top": 367 + } + }, + "inputs": { + "thru": { + "accepts": "any" + } + }, + "outputs": { + "throughput": { + "emits": "any", + "calls": [] + } + }, + "state": { + "prefix": "LOGGER:", + "message": "---" + } + } + } +} \ No newline at end of file