diff --git a/README.md b/README.md index 4bd3ed5cf2aadee6678f940977e624ebdd0789d8..b2b025eed50db91b2fa6b77bb35a04e628fb405c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,12 @@ Native Cuttlefish 'Hunks' are given access to a DOM/div element, making them nic # Scratch +- sleeper .hidden +- sleeper append to link, +- view doms can expand ? +- hidden .insideout backgrounds ? +- link walls, etc + - view ... compartmentalize, then .makeTopLevel(dom) - not going to change messaging structure - but only top level can run routines like 'expand link' ... @@ -35,7 +41,7 @@ Native Cuttlefish 'Hunks' are given access to a DOM/div element, making them nic - link exists - view appears, - routes connect - - then we can draw + - then we can draw - considering more link complexity: when a link is NC on the other end, inputs to it should vanish into aether, same as an nc output in a program, no? this also means we don't have to keep track of whether a manager is hooked up anywhere or not diff --git a/hunks/view.js b/hunks/view.js index c1f10def8c1018b24f8a9a3236094cda9e5da53e..ef504108d9bf7224bb72b96f6c30aee5e617d4e2 100644 --- a/hunks/view.js +++ b/hunks/view.js @@ -374,10 +374,14 @@ function View() { $(this.plane).append(def.de) dt.writeTransform(def.de, { s: 1, - x: 500, - y: 500 + x: 1, + y: 1 }) defs.push(def) + // oh .. eventually this will hook to a link, but for now ... + if(def.name !== 'tlview'){ + $(def.de).append($(native.dom).addClass('sleeper')) + } } else { console.error('cannot find view dom or ref', def) } @@ -906,7 +910,12 @@ function View() { // i.e. requestAddHunk isn't necessarily hooked to this // it's always tlview.requestAddHunk this.requestAddHunk('view').then((viewDef) => { - console.log('new view', viewDef) + // jquery moves automatically ? + let viewDe = $(viewDef.de).find('.sleeper').get(0) + $(linkDef.de).append(viewDe) + $(viewDe).removeClass('sleeper') + linkDef.setPlaneWidth(1200) + // hook it 2 ur veins console.log('adding one link...') this.requestAddLink(linkDef.outputs[1], viewDef.inputs[0]) .then(() => { diff --git a/style.css b/style.css index 0581558f30fa4021799a7a788f7b0e447965d454..7ddd68282ce396418609a333eb42127b83c26f7e 100644 --- a/style.css +++ b/style.css @@ -54,6 +54,10 @@ body { background-size: 100px 100px; } +.view.sleeper{ + display: none; +} + .msgbox { width: 300px; height: 90%; diff --git a/view/vdef.js b/view/vdef.js index 6402e809503b0219c45c6a20196dada9336c8da6..56e0a64287a76cdea315f221ec8bedccd806340f 100644 --- a/view/vdef.js +++ b/view/vdef.js @@ -160,16 +160,17 @@ function HunkDefinition(spec, view, dt, debug) { /* --------------------- SOME ARE UNIQUE --------------------- */ /* --------------------------- ---------------------------- */ - // inside-out defs, this.makeInsideOut = () => { - console.error('make inside out') - console.log(this) - console.log(this.de) + // much work could be done to beautify this // can we do ... $(this.de).find('.inputs').addClass('insideout') $(this.de).find('.outputs').addClass('insideout') - + this.de.style.zIndex = '-1' + } + + this.addResizers = () => { + } // set width,