graflow: tempwire on creating new wire
This commit is contained in:
98
graflow_examples/flows/testFlowEvent1.json
Normal file
98
graflow_examples/flows/testFlowEvent1.json
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"nodesFile": "./nodesLib/nodesEIC.html",
|
||||
"flow": {
|
||||
"nodes":[
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "config",
|
||||
"ncoords": { "x": 50, "y": 120},
|
||||
"markup": {
|
||||
"title": "Configure event",
|
||||
"subtitle": "",
|
||||
"severity": "warning"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "mailinvit",
|
||||
"ncoords": { "x": 100, "y": 220},
|
||||
"markup": {
|
||||
"title": "Candidates invitation mailing",
|
||||
"subtitle": "",
|
||||
"severity": "success"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "applicationsurvey",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Application survey",
|
||||
"subtitle": "",
|
||||
"severity": "success"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "enrollment",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Candidates enrollment",
|
||||
"subtitle": "",
|
||||
"severity": "secondary"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "mailwelcome",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Welcome mailing",
|
||||
"subtitle": "",
|
||||
"severity": "warning"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "mailrejection",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Rejection mailing",
|
||||
"subtitle": "",
|
||||
"severity": "warning"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "event",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Event",
|
||||
"subtitle": "",
|
||||
"severity": "secondary"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "mailstatisfaction",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Satisfaction survey mailing",
|
||||
"subtitle": "",
|
||||
"severity": "success"
|
||||
}
|
||||
},
|
||||
{ "nodeType": "eicBasic",
|
||||
"id": "satisfactionsurvey",
|
||||
"ncoords": { "x": 150, "y": 320},
|
||||
"markup": {
|
||||
"title": "Satisfaction survey",
|
||||
"subtitle": "",
|
||||
"severity": "warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{ "from": ["config", "out1"], "to": ["mailinvit", "in1"] },
|
||||
{ "from": ["mailinvit", "out1"], "to": ["applicationsurvey", "in1"] },
|
||||
{ "from": ["applicationsurvey", "out1"], "to": ["enrollment", "in1"] },
|
||||
{ "from": ["enrollment", "out1"], "to": ["mailwelcome", "in1"] },
|
||||
{ "from": ["enrollment", "out1"], "to": ["mailrejection", "in1"] },
|
||||
{ "from": ["mailwelcome", "out1"], "to": ["event", "in1"] },
|
||||
{ "from": ["event", "out1"], "to": ["mailstatisfaction", "in1"] },
|
||||
{ "from": ["mailstatisfaction", "out1"], "to": ["satisfactionsurvey", "in1"] }
|
||||
]
|
||||
}
|
||||
}
|
||||
98
graflow_examples/test3.1.html
Normal file
98
graflow_examples/test3.1.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>graflow</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||
<script src="../buildoz.js"></script>
|
||||
<script src="../bzGraflow.js"></script>
|
||||
<style>
|
||||
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||
font-family: 'glyphs';
|
||||
src: url('/assets/styles/fonts/glyphs.eot');
|
||||
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
body{
|
||||
display: grid;
|
||||
grid-gap: 5px;
|
||||
background:#888;
|
||||
font-size: 16px;
|
||||
}
|
||||
.demooptions{
|
||||
padding: 2px;
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
width: 10em;
|
||||
background: #FFFB;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
z-index:99999;
|
||||
font-size: .7em;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
.demooptions button{
|
||||
text-transform: none;
|
||||
margin: 2px;
|
||||
font-size: 1em;
|
||||
}
|
||||
bz-graflow{
|
||||
overflow: scroll;
|
||||
border: 2px solid black;
|
||||
}
|
||||
bz-graflow.eic{ grid-column: 1 / -1; width: 120vw; height: 40vh; background: var(--eicui-base-color-grey-10); }
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener('load',()=>{
|
||||
let grflw2 = document.querySelector('bz-graflow.eic')
|
||||
grflw2.setAttribute('tension', document.querySelector('input[data-id="eic"]').value)
|
||||
grflw2.setAttribute('align', document.querySelector('select[name="align"]').value)
|
||||
grflw2.setAttribute('wiretype', document.querySelector('select[name="wiretype"]').value)
|
||||
grflw2.addEventListener('refresh',
|
||||
(evt) => { grflw2.style.transform = 'scale(.75)'; }
|
||||
)
|
||||
document.querySelector('[data-trigger="onAutoplace2H"]').addEventListener('click',
|
||||
(evt) => { grflw2.autoPlace('horizontal', 100, 30, 1000, document.querySelector('[data-id="eic"]').value) }
|
||||
)
|
||||
document.querySelector('[data-trigger="onAutoplace2V"]').addEventListener('click',
|
||||
(evt) => { grflw2.autoPlace('vertical', 80, 80, 1000, document.querySelector('[data-id="eic"]').value) }
|
||||
)
|
||||
document.querySelector('input[data-id="eic"]').addEventListener('change',
|
||||
(evt) => { grflw2.setAttribute('tension', evt.target.value); grflw2.refresh() }
|
||||
)
|
||||
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||
(evt) => { grflw2.setAttribute('wiretype', evt.target.value); grflw2.refresh() }
|
||||
)
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<bz-graflow class="eic" flow="./flows/testFlowEvent1.json" tension="50">
|
||||
<div class="demooptions"> <!-- just for demo purposes -->
|
||||
<button data-trigger="onAutoplace2H">Auto-place Horizontal</button>
|
||||
<button data-trigger="onAutoplace2V">Auto-place Vertical</button>
|
||||
<select name="align" data-id="eic">
|
||||
<option value="center">Center</option>
|
||||
<option value="first" selected>First</option>
|
||||
<option value="last">Last</option>
|
||||
<option value="parent">Parent</option>
|
||||
</select>
|
||||
<select name="wiretype">
|
||||
<option value="ortho">Ortho</option>
|
||||
<option value="straight">Straight</option>
|
||||
<option value="bezier" selected>Bezier</option>
|
||||
</select>
|
||||
<div class-"cols-2"=""><label>tension</label><input data-id="eic" type="number" size="2" value="50"></div>
|
||||
</div>
|
||||
</bz-graflow>
|
||||
</body>
|
||||
</html>
|
||||
@@ -118,6 +118,7 @@
|
||||
setTimeout(sevanimation, 1000)
|
||||
}
|
||||
grflw4.addEventListener('refreshed',() => {
|
||||
if(aifmi) return
|
||||
aifmi = grflw4.stagedNodes['aifm-investment'].querySelector('.body')
|
||||
sevanimation()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user