-
Notifications
You must be signed in to change notification settings - Fork 1
/
FlexiPlasmidDraw2017.html
281 lines (252 loc) · 7.34 KB
/
FlexiPlasmidDraw2017.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Flexi plasmid draw 2017</title>
<script type="text/javascript" src="plasmid2017.js">
</script>
<style type="text/css">
html{
background: black;
}
body{
background-color: #555555;
margin: auto;
padding: 5px;
width: 800px;
max-width: 90%;
min-width: 50%;
}
h1{
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
background: linear-gradient(to bottom, #7d7e7d 0%,#0e0e0e 100%);
color:gold;
padding: 10px;
}
p{
color: antiquewhite;
}
a{
color:#33ccff;
}
a:hover{
color:red;
}
table{
width: 100%;
max-width: 100%;
text-align: center;
padding: 2pt;
}
thead{
word-wrap: break-word;
color: #33ccff;
font-family: Arial, Helvetica, sans-serif;
font-size: 1em;
font-style: normal;
}
th{
font-weight: normal;
}
th:hover{
color: greenyellow;
}
caption{
background: linear-gradient(to bottom, #7d7e7d 0%,#0e0e0e 100%);
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: antiquewhite;
text-align: center;
padding: 3pt;
}
td{
color:#33ccff;
}
input:focus{
background-color: yellow;
}
input[type=text]{
width: 12em;
}
input[type=number]{
width: 6em;
}
input[type=checkbox]{
width: 3em;
}
.red{
color: red;
}
.green{
color: greenyellow;
}
.blue{
color: blue;
}
#txtStrokeRed{
color: red;
}
#txtStrokeGreen{
color: green;
}
#txtStrokeBlue{
color: blue;
}
#fomFeatureList table{
border-style: none;
}
#fomFeatureList table tr:nth-child(even){
background-color: #7d7e7d;
}
#fomFeatureList table tr td:first-child{
color:antiquewhite;
}
#PreviewArea{
background-color: #fff9e6;
width: 800px;
height: 600px;
margin: auto;
}
</style>
</head>
<body>
<h1>Flexi Plasmid Draw 2017</h1>
<p>
Copyright reserved by Mr. <a href="mailto:[email protected]">Tse Yuk Man</a>, 2008-2017. Hong Kong.</p>
<p class="style5"><a href="helpd.htm">Help!</a></p>
<form id="fomPlasmidSetting">
<table id="tblPlasmidSetting">
<caption>General Plasmid Settings</caption>
<thead><th>Name:</th><th>Show?</th><th>Size:</th><th>Show?</th><th>Backbone Radius:</th><th>Width</th><th>Color</th><th>Show?</th></thead>
<tr>
<td><input type="text" id="txtPlasmidName" value="" placeholder="(Plasmid Name)"/></td>
<td><input type="checkbox" id="bolShowPlasmidName" checked="checked" /></td>
<td><input type="number" id="txtPlasmidSize" value="1000" min="10" /></td>
<td><input type="checkbox" id="bolShowPlasmidSize" checked="checked" /></td>
<td><input type="number" id="txtRadius" value="200" min=0/></td>
<td><input type="number" id="txtBackBoneWidth" value="2" min=0/></td>
<td><input type="color" id="colBackbone" value=#000000 /></td>
<td><input type="checkbox" id="bolShowBackBone" checked="checked" /></td>
<td><input type="reset" value="Reset"/></td>
</tr>
</table>
</form>
<form id="fomFeatureSetting">
<table id="tblFeatureSetting">
<caption>General Feature Settings</caption>
<thead>
<th>Feature Width</th><th>Stroke Width</th><th>Stroke Color</th><th>Arrow head length</th><th>Arrow head width</th>
</thead>
<tr>
<td><input type="number" id="txtFeatureWidth" value="20" min=0 /></td>
<td><input type="number" id="txtFeatureStrokeWidth" value="0" min=0 /></td>
<td><input type="color" id="colFeatureStroke" value=#000000 /></td>
<td><input type="number" id="txtArrowHeadLength" value="5" min=0 />°</td>
<td><input type="number" id="txtArrowHeadWidth" value="5" min=0 />px</td>
<td><input type="reset" value="Reset"/></td>
</tr>
</table>
</form>
<form id="fomTextSetting">
<table id="tblTextSetting">
<caption>Text Settings</caption>
<thead>
<th>Show Text</th><th>Font family</th><th>Size</th><th>Color</th><th>Bold?</th><th>Text Location</th>
</thead>
<tr>
<td><input type="checkbox" id="bolShowText" checked="checked" /></td>
<td><select id="optFontFamily" >
<option value="0" selected="selected" style="font-family:Arial, Helvetica, sans-serif">Arial</option>
<option value="1" style="font-family:'Times New Roman', Times, serif">Times</option>
<option value="2" style="font-family:'Courier New', Courier, monospace">Courier</option>
<option value="3" style="font-family: 'Yu Gothic', YuGothic, Gothic, Meiryo">中日韓用</option>
</select>
</td>
<td><input type="number" value="12" id="txtFontSize" min=6 /></td>
<td><input type="color" id="colFont" value=#000000 /></td>
<td><input type="checkbox" id="bolTextBold" checked="checked" /></td>
<td><select id="optTextLocation" >
<option value="0" selected="selected">Outside circle</option>
<option value="1">Inside circle</option>
<option value="2">Curve inside feature</option>
<option value="3">Curve inside (IE)</option>
</select>
</td>
<td><input type="reset" value="Reset"/></td>
</tr>
</table>
</form>
<form id="fomCanvasSetting">
<table id="tblCanvasSetting">
<caption>Canvas Size Setting</caption>
<thead><th>Width(px)</th><th>Height(px)</th></thead>
<tr><td><input type="number" id="txtCanvasWidth" value="800" min=64 /></td>
<td><input type="number" id="txtCanvasHeight" value="600" min=64 /></td>
<td><input type="reset" value="Reset"/></td>
</tr>
</table>
</form>
<p class="style1">Color References</p>
<ul>
<li><a href="Rainbow ColorWheel.svg">Rainbow Color Wheel and RGB percentage values</a></li>
<li><a href="Red-Yellow wheel.svg">Red-Yellow Spectrum</a></li>
<li><a href="Yellow-Green Spectrum.svg">Yellow-Green Spectrum</a></li>
<li><a href="Green-Blue Spectrum.svg">Green-Blue Spectrum</a></li>
<li><a href="Blue-Red Spectrum.svg">Blue-Red Spectrum</a></li>
<li><a href="example deluxe.svg">Deluxe Example</a></li>
</ul>
<hr />
<p>
<button id="btnAddFeature" onclick="addFeature()">Extend List</button>
<button id="btnDelFeature" onclick="delFeature()">Drop Last Item</button>
</p>
<form id="fomFeatureList">
<table id="tblFeatureTable">
<caption>Feature List:</caption>
<thead>
<th>Visible?</th><th>Name:</th>
<th><i>Italic?</i></th>
<th>Start:</th>
<th>End:</th>
<th>Arrow?</th>
<th>Fill Color</th>
</thead>
<tbody>
<tr>
<td>01<input type="checkbox" id="visible00" /></td>
<td><input type="text" id="txtFeatureName00" value=""/> </td>
<td><input type="checkbox" id="bolItalic00"/></td>
<td><input type="number" value="" id="txtFeatureStart00"/></td>
<td><input type="number" value="" id="txtFeatureEnd00"/></td>
<td><input type="checkbox" id="bolArrowOn00" checked="checked"/></td>
<td><input type="color" value=#00CCFF id="colFeature00"/></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<input type="button" value="Draw/Overwrite" onclick="main(0)"/>
<input type="button" value="Overlay" onclick="main(1)"/>
<input type="reset" value="Clear Feature List"/>
</form>
<hr />
<p>Preview Area:</p>
<p id="PreviewArea">
<svg id="pic" xmlns="http://www.w3.org/2000/svg" version="2.0" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="600px">
<circle x="5" y="5" r="2" fill="black"></circle>
</svg>
</p>
<p>
<button onclick="SaveSVG()">Save SVG</button>
</p>
<p>
<button onclick="SavePNG()">Save PNG</button>
Output Scale:<input type="number" id="pngscale" value=100>%</input>
</p>
<hr />
<p>Copy the code below and save as a text file with .svg extension</p>
<form>
<textarea id="SVGCode" cols="100" rows="15" readonly="readonly">
</textarea>
</form>
</body>
</html>