Commit 92934cb7 authored by Jake Read's avatar Jake Read
Browse files

about to rid of dat gui

parent f9dd31aa
......@@ -7,6 +7,13 @@ javascript system for jake for building robot applications,
.. rn: do terminal HTML?
.. then: consider model for node.js server, model-view-controller or w/e ?
## remember
you have friends
- bro
- sean
- nathan
## links to things
http://designmodo.github.io/Flat-UI/
......@@ -39,3 +46,13 @@ To wrap, we write a representation in api-type rep, with one connection. We outp
For extra points, we read in the connection also with an SVG layer - iterating through connections of the represented program.
# The RPI
- sudo apt-get update
- sudo apt-get upgrade
- install nvm
-
- install git
- https://cnc.js.org/
- https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-%7C-Install-Node.js-via-Node-Version-Manager-(NVM)
\ No newline at end of file
......@@ -118,6 +118,11 @@ function addRep(rep) {
domElem.style.left = lastPos.X + 'px'
domElem.style.top = lastPos.Y + 'px'
if(rep.ui != null){
domElem.style.left = rep.ui.left +'px'
domElem.style.top = rep.ui.top + 'px'
}
// more html: the title
var title = document.createElement('div')
title.className = 'modname'
......@@ -125,11 +130,13 @@ function addRep(rep) {
title.alt = rep.description.alt
domElem.appendChild(title)
// if having UI element, place them
// we'll hold on to this, useful!
rep.ui = {}
rep.ui.domElem = domElem
// using datgui to write the interface for state
// WRITE UI ELEMENTS
var datElem = document.createElement('div')
datElem.className = 'inside'
var datui = new dat.GUI({ autoplace: false })
......@@ -161,8 +168,7 @@ function addRep(rep) {
// add this as well to the representation obj
rep.ui.dat = datui
// add the inputs and outputs
// get more involved here, do ln 241
// WRITE INPUTS AND OUTPUTS
var inElem = document.createElement('div')
inElem.className = 'inputs'
rep.ui.inputs = {}
......
......@@ -21,7 +21,7 @@ body {
}
.inputs {
width: 58px;
width: 78px;
float: left;
margin-left: 2px;
font-size: 11px;
......@@ -30,7 +30,7 @@ body {
}
.inside {
padding: 0 63px 0 63px;
padding: 0 83px 0 83px;
}
.dg.a {
......@@ -38,7 +38,7 @@ body {
}
.outputs {
width: 58px;
width: 78px;
float: right;
margin-right: 2px;
text-align: right;
......
......@@ -112,6 +112,17 @@ var gcode = addModule('./src/parsing/gcode.js')
term.outputs.lineOut.attach(gcode.inputs.lineIn)
// to add UI vars to prgmem / save them
// typically, set in ui, saved in ui
term.ui = {}
term.ui.left = 10
term.ui.top = 10
gcode.ui = {}
gcode.ui.left = 200
gcode.ui.top = 200
console.log('modules at prgmem start', modules)
/*
......@@ -136,7 +147,7 @@ function addModule(path) {
// get and set skullduggery
for (item in mod.state) {
// turn into 'don't f with' property
mod.state['_' + item] = 'item'
mod.state['_' + item] = mod.state[item]
// make oj ptr into object
mod.state[item] = {}
// write getter and setter for object
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment