-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflEditor.html
executable file
·131 lines (116 loc) · 4.51 KB
/
flEditor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>workly.com/flows/editor</title>
<link rel="stylesheet" href="flStyles.css">
<script type="text/javascript" src="flNodes.js"></script>
<script type="text/javascript" src="flEditor.js"></script>
<script type="text/javascript">
var theE, theCx;
// callback for attribute text entry
function atrKeyIn(nID, iInd) { theE.atrKeyIn(nID, iInd, "ping"); }
// callback to select an attribute
function atrSelect(nID, iInd) { theE.atrSelect(nID, iInd); }
function starterupper() {
var aCv = document.getElementById("theFlCanvas");
//theCx = aCv.getContext("2d");
theE = new flEditor(document, aCv);
theE.loadFromLibrary("libs/vMath.js", theE);
theE.loadFromLibrary("libs/proportion.js", theE);
theE.loadFromLibrary("libs/parts.js", theE);
aCv.addEventListener('mousemove', function(evt) { theE.mouseMove(evt); } );
aCv.addEventListener('mouseup', function(evt) { theE.mouseUp(evt); } );
aCv.addEventListener('mousedown', function(evt) { theE.mouseDown(evt); } );
aCv.addEventListener('selectNodes', function(evt) { theE.setMakerButtons(evt); } );
theE.redraw();
}
</script>
</head>
<body onLoad="starterupper();" >
<div class="container">
<div class="scrSheet"><!--node canvas-->
<div class="scrCanvasColumn">
<canvas id="theFlCanvas"
class="scrCanvas"
width="884"
height="720"></canvas>
<div class="clear"></div>
</div>
<div class="scrNodeButtonColumn"><!--node-set buttons here to allow them to stack nice-->
<div class="scrNodeButtonHolder">
<button onclick="theE.duplicateNode();" class="scrNodeOp">Duplicate</button></br>
</div>
<div class="scrNodeButtonHolder">
<button onclick="theE.deleteNode();" class="scrNodeOp">Delete</button></br>
</div>
<div id="makerButtonHolder">
<div class="scrNodeButtonHolder">
<button onclick="theE.makeNode('add');" class="scrNodeOp">Got bugs!</button></br>
</div>
</div>
</div>
</div>
<div class="conContainer"><!-- main controls div -->
<div class="conBlockContainer">
<div class="conFileLeftButtonColumn"> <!-- yellow buttons lhs -->
<div class="conFileLeftButtonHolder">
<button onclick="theE.edNew();" class="conFileButton">New/Clear</button>
<div class="clear"></div></div>
<div class="conFileLeftButtonHolder">
<button onclick="theE.edReport();" class="conFileButton">Report</button>
<div class="clear"></div></div>
<div class="clear"></div>
</div>
<div class="conFileRightButtonColumn">
<div class="conFileRightButtonHolder"><!-- yellow buttons rhs -->
<button onclick="theE.edLoad();" class="conFileButton">Load</button>
</div>
<div class="conFileRightButtonHolder">
<button onclick="theE.edEvaluate();" class="conFileButton">Eval</button>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="conBlockContainer"><!--load file path-->
<div class="conPickerItem">
File to load:<br>
<input class="conAttributeInputBox" type="file" id="ldFile" />
<div class="clear"></div>
</div>
</div>
<div class="conBlockContainer"><!-- dropdown node set switch -->
<div class="conMakeDropHolder">
<select id='nodeSet' class="conMakeDrop" onChange="theE.setMakerButtons(value);"> </select>
</div>
<div class="clear"></div>
</div>
<div class="conBlockContainer">
<div class="conXMLContainer"><!-- messages -->
<div class="conMessages" id="messages">messages go here</div>
</div>
</div>
<div class="conBlockContainer">
<div class="conAttributeItem">
<div class="conAttributeNameSide">
Inputs:
</div>
<div class="clear"></div>
</div>
<div id="inputsControls"> <!-- input attrs list here -->
</div>
<div class="conAttributeItem">
<div class="conAttributeNameSide">
Output:
</div>
<div class="clear"></div>
</div>
<div id="outputsControls"> <!-- yep -->
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div> <!--controls-->
</div><!-- container -->
</body>
</html>