-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.htm
544 lines (430 loc) · 36.9 KB
/
index.htm
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
<!DOCTYPE HTML>
<html>
<head> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>SVG Tessellated Tile Drawings</title>
<script type="text/javascript" src="highlight.pack.js"></script>
<link href='highlight.css' rel='stylesheet' />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script charset="UTF-8" type="text/javascript" src="js00_utility/iframeSelection.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/zoom.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/hmiSymbolSelection.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/color.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/pathSeg.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/select.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/helperFuncts.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/cookie.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/print.js"></script>
<script charset="UTF-8" type="text/javascript" src="js00_utility/showHideHelp.js"></script>
<script charset="UTF-8" type="text/javascript" src="js01_start/jquery2.js"></script>
<script charset="UTF-8" type="text/javascript" src="js01_start/initD3Svg.js"></script>
<script charset="UTF-8" type="text/javascript" src="js01_start/grid.js"></script>
<script charset="UTF-8" type="text/javascript" src="js01_start/svg.js"></script>
<script charset="UTF-8" type="text/javascript" src="js02_location/cursorLoc.js"></script>
<script charset="UTF-8" type="text/javascript" src="js02_location/transformAdd.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjZoom.js"></script>
<script charset="UTF-8" type="text/javascript" src="js04_svgSource/handleSource.js"></script>
<script charset="UTF-8" type="text/javascript" src="js04_svgSource/showSource.js"></script>
<script charset="UTF-8" type="text/javascript" src="d3.v4.min.js"></script>
<style type="text/css">
.noselect {
/*---prevent text element focus under create/edit elements---*/
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
unselectable="on"
onselectstart="return false;"
onmousedown="return false;"
}
</style>
</head>
<body style='font-family:arial;background:#f0f8ff' >
<DIV id=containerDiv style=position:absolute;top:60px;left:0px >
<TABLE>
<TR>
<TD valign=top>
<DIV ID="iframeDiv" style='position:relative;top:0px;left:0px;width:400px'>
<div id=addElemIconFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemIconFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Icon/drawIcon.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjIcon.js"></script>
<div id=addElemCircleFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemCircleFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Circle/drawCircle.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjCircle.js"></script>
<div id=addElemArcFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemArcFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Arc/drawArc.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjArc.js"></script>
<div id=addElemEllipseFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemEllipseFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Ellipse/drawEllipse.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjEllipse.js"></script>
<div id=addElemRectFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemRectFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Rect/drawRect.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjRect.js"></script>
<div id=addElemBGimageFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemBGimageFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/BGimage/drawBGimage.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjBGimage.js"></script>
<div id=addElemTessellateFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemTessellateFrame src=AddElem/addElemTessellate.htm style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/pallet.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/rotate.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/rowColumn.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/tessKeys.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/tileSize.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/tessellateUtils.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/trimBox.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Tessellate/drawTessellate.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjTessellate.js"></script>
<div id=addElemTextFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemTextFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Text/drawText.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjText.js"></script>
<div id=addElemPathFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemPathFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Path/drawPath.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Path/drawPathButton.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Path/pathZoneMarker.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragPathPoint.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragAddPath.js"></script>
<div id=addElemPathEditFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemPathEditFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Path/drawPathEdit.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Path/drawPathEditButton.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Path/pathEditZoneMarker.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragPathPointEdit.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragPathEdit.js"></script>
<div id=addElemSymbolFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemSymbolFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Symbol/drawSymbol.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjSymbol.js"></script>
<div id=addElemTextureFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemTextureFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Texture/drawTexture.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Texture/textures.js"></script>
<div id=addElemGradientFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemGradientFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Gradient/drawGradient.js"></script>
<div id=addElemPolygonFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemPolygonFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Polygon/drawPolygon.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjPolygon.js"></script>
<div id=addElemSchematicFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=addElemSchematicFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/drawSchematic.js"></script>
<script charset="UTF-8" type="text/javascript" src="js03_drag/dragObjSchematic.js"></script>
<div id=editElemSchematicFrameDiv style='padding:10px;border-radius:10px;position:fixed;visibility:hidden;width:1px;height:1px;overflow:hidden'><iframe id=editElemSchematicFrame style='border-width:0px;height:1px;overflow:hidden;' scrolling='no' frameborder='0' ></iframe></div>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/editSchematic.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/aspSchematicRequest.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/updateSchematic.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/writeSchematicSymbols.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/writeSchematicTextures.js"></script>
<script charset="UTF-8" type="text/javascript" src="AddElem/Schematic/writeSchematicGradients.js"></script>
</DIV>
</TD>
<TD>
<div id=svgDiv style="border:1px solid black;width:800px;height:560px">
<svg id=mySVG width=800 height=560 viewBox="0 0 800 560" style="cursor:default">
<style type="text/css" >
<![CDATA[
.grid line {
stroke: lightgrey;
stroke-opacity: 0.7;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
]]>
</style>
</svg>
</div>
<center>
<p></p>
Drawing Width:<input type="text" value=800 id=svgWidthValue style='width:40px' />
Drawing Height:<input type="text" value=560 id=svgHeightValue style='width:40px' /> <button id=setSVGSizeButton onClick=setSVGSizeButtonClicked() title="Set SVG drawing size">set</button>
<TABLE style=width:800px;><TR>
<TD>
<button title="Show current drawing's SVG source" onClick=svgCopy()>SVG Source</button>
<button title="Copy SVG for other applications" onClick=publishSVG()>Publish</button>
<button id=clearButton title="Clear current SVG drawing" onClick=clearButtonClicked() >Clear/Start Over</button> </TD>
<TD>
<table>
<tr>
<td><nobr>Save SVG As:</nobr></td>
<td><input id="inputFileNameToSaveAs" placeholder="Include your fileName.svg"></input></td>
<td><button Title="Save current drawing to your computer" onclick="saveSvgAsFile()">save</button></td>
</tr>
</table>
</TD>
<TD>
<button title="Import/Edit an existing SVG schematic drawing" onClick=openExistingSVG()>Existing SVG</button></TD>
</TR>
<TR>
<TD COLSPAN=3 ALIGN=CENTER>
<div class="copy" id=existingSVGDiv style="display:none">
<textarea id=existingSVGValue placeholder="Paste existing svg schematic source here..." style=width:90%;height:100px></textarea>
<br> <button id=closeExistingDivButton style='visibility:hidden' title="Close" onclick=closeExistingDiv()>cancel</button> <button style=color:blue; onClick=insertExistingSVG()><u>insert</u></button>
</div>
<div class="copy" id=publishSVGDiv style="display:none">
<center>Download this schematic to your computer for publication in other applications.</center>
<textarea id=publishSVGValue style=width:90%;height:100px></textarea>
<table>
<tr>
<td><nobr>Publish SVG As:</nobr></td>
<td><input id="inputPublishFileNameToSaveAs" placeholder="Include your fileName.svg"></input></td>
<td><button Title="Save current drawing to your computer" onclick="publishSvgAsFile()">send</button></td>
<td><button style='background:lightgreen' Title="Publish: Mobile-Friendly" onclick="openMobileHelp()">Mobile</button></td>
<td><button id=closePublishDivButton style='visibility:hidden' title="Close" onclick=closePublishDiv()>Close</button></td>
</tr>
</table>
</div>
</TD>
</TR></TABLE>
</TD>
</TR>
</TABLE>
<center>
<div id=svgSaveDiv class="copySource" style=display:none;height:1px;overflow:auto;width:1200px;text-align:left; /></div>
<div id=svgSourceDiv style=display:none;overflow:auto;width:1200px;text-align:left; /></div>
<p></p>
<div style='width:100%;text-align:right' >Download SVG-Tile .zip file <a href="https://github.com/fhemsher/SVG-Tile" target="_blank">SVG-Tile.com Files</a></div>
<div id=emDiv style='width:100%;text-align:right' ></div><p></p>
</center>
</DIV>
<div id=introDiv style='position:absolute;top:60px;left:10px;width:360px;background:#ABCDEF;border:1px solid blue;border-radius:15px;padding:10px;color:MIDNIGHTBLUE'>
<center>
<b>Create/Save/Edit SVG Tiling Drawings</b><br>
<img src="Images/circleTess.png" alt="" />
</center>
Use SVG shapes to draw tile diagrams.
SVG shapes are: Circles, ellipses, rectangles, text, paths, arcs, polygons, symbols and icons.<p></p>
Also includes Tile Schematic Library, comprised of SVG shapes.
<p></p>
You can share your custom schematics with others by adding them to the library.
</div>
<div id=helpDiv style='visibility:hidden;position:absolute;top:60px;left:10px;width:360px;height:1px;background:linen;border:1px solid blue;border-radius:15px;padding:10px;overflow:hidden'>
<table style=width:100%><td style=width:90%; align=center><h7><b>Creating SVG Shape Elements</b></h7></td><td align=right><button onclick=closeHelp()>X</button></td></table>
<br>
<b>Paths</b> - Both linear and curved paths can be created by clicking their points on the drawing. Drag any point to modify its shape.
<br>Paths can also create 3d-like strokes:
<center><img src="Images/pipe3d.png" alt="Control Diagram 3D Piping" width="115" height="61" /></center>
<br>Paths can include evenly-spaced markers along the path:
<center><svg xmlns="http://www.w3.org/2000/svg" id="publishSVG" width="300" height="60" viewBox="0 0 300 60" style="cursor: default; touch-action: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><style xmlns="http://www.w3.org/1999/xhtml"></style><defs xmlns="http://www.w3.org/1999/xhtml"></defs>
<g id="publishG"><g id="publishElemG" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" pointer-events="none"><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(33,23)rotate(57.52877418269262)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(40.761165618896484,34.64546203613281)rotate(-127.78653371949643)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(51.5299186706543,43.34810256958008)rotate(20.511912412806225)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(65.26084899902344,43.62485885620117)rotate(165.78722864430893)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(78.42819213867188,38.89059829711914)rotate(-21.754004011747273)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(91.61798858642578,34.218658447265625)rotate(164.49467862385941)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(105.46361541748047,33.25312042236328)rotate(11.145924748692435)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(118.62879180908203,37.90804672241211)rotate(-155.73611872524313)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(131.64048767089844,43.03495407104492)rotate(14.667089803707556)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(145.50650024414062,44.05995559692383)rotate(173.4154664731933)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(159.0949249267578,40.76487731933594)rotate(-17.814757045046537)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(172.3617401123047,36.29092025756836)rotate(161.4523200030853)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(185.81329345703125,32.43181228637695)rotate(-11.843642515807561)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(199.71221923828125,31.258516311645508)rotate(-175.87414335827106)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(213.20037841796875,34.800254821777344)rotate(22.91443277354848)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(225.7602996826172,40.97504425048828)rotate(-152.19894898728347)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(238.49392700195312,46.751407623291016)rotate(16.769713021059296)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(252.28749084472656,47.265995025634766)rotate(166.869269985224)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(264.9097595214844,41.36123275756836)rotate(-33.97558263619209)">▲</text><text font-size="15" text-anchor="middle" font-family="Arial Unicode MS" stroke-width="0.3" fill="#DC143C" stroke="black" transform="translate(275.83447265625,32.62757873535156)rotate(137.65995981044193)">▲</text><path fill="none" fill-opacity="0" stroke="#9400D3" stroke-width="2" d="M33,23L36.5,28.5C40,34,47,45,58.83336,44.66664C70.6667,44.33336,87.3333,32.66664,101.1667,32.83336C115,33,126,45,142.3334,44.33336C158.6666,43.66664,180.3334,30.33332,198.3334,31.16668C216.3334,32,230.6666,47,244.6666,48C258.667,49,272.333,36,279.167,29.5L286,23" linearD="M 33 23 L 54 56 L 104 21 L 137 57 L 202 17 L 245 62 L 286 23" markers="true" marker-unicode="25B2" marker-fill="#DC143C" marker-fontsize="15" marker-quantity="20"/></g></g></svg></center>
<br><b>Text</b> - This includes typing of formulas and equations.
<center><img src="Images/mathFormula.png" alt="Math Equations" /></center>
<br><b>Symbols</b> - This a list of thirty(30) polygons that can be created and placed in the drawing.
<br><b>Icons</b> - Over 500 icons created from unicode text elements.
<center><img src="Images/icons.png" alt="Icons" /></center>
<br><b>Textures</b> - Three(3) types of pre-built patterns are available: circles, lines, and paths. The pattern is placed in either an element's fill or stroke.
<br><b>Gradients</b> - Radial and linear gradients can be created to be placed in either an element's fill or stroke.
<br> <b>Shadows</b> - Each element can be selected to include a drop-shadow.
<br><br><img align=left src="Images/rightClick.png" alt="" width="45" height="65" /> NOTE: Any element can be changed with cursor over element & mouse <b style=color:red>Right-Click</b>.
</div>
<center>
<div id=selectDrawElemDiv style='width:100%;background:#f0f8ff;position:fixed;top:0px;left:0px;'><b><span style="font-weight:bold;color:red;font-family:times new roman">SVG</span> <span style=color:blue><i>Tile</i></span></b><button onClick=openHelp() style=width:25px;height:25px;padding:0px;border:0px;background:transparent ><img src="Images/help.png" alt="SVG SCADA Control Diagrams" width=25 height=25 /></button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddTessellateButton style=background-color:#a7fc00 onClick=previewTessellate() title="Preview Tile Tessellate">Tile Tessellations</button><img onClick=openTessellateHelp() align=center src="Images/help.png" width=20 height=20 alt="SVG Tile Tessellations" />
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=getSchematicLibraryButton style=background-color:#E0CAEA onClick=getSchematicLibrary()>Tile Schematics</button><img id=openSchematicButton onClick=openSchematicHelp() align=center src="Images/help.png" width=20 height=20 alt="SVG Tile Schematics" />
<br>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddCircleButton style=background-color:linen onClick=openAddCircleDraw()>Circles</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddEllipseButton style=background-color:linen onClick=openAddEllipseDraw()>Ellipses</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddRectButton style=background-color:linen onClick=openAddRectDraw()>Rectangles</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddTextButton style=background-color:linen onClick=openAddTextDraw()>Text</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddPathButton style=background-color:linen onClick=openAddPathDraw()>Paths</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddArcButton style=background-color:linen onClick=openAddArcDraw()>Arcs</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddPolygonButton style=background-color:linen onClick=openAddPolygonDraw()>Polygons</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddIconButton style=background-color:linen onClick=openAddIconDraw()>Icons</button>
<button onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddSymbolButton style=background-color:#538BBA;color:white onClick=openAddSymbolDraw()>Symbols</button>
<button title="Add pattern/texture fill to elements" onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddTextureButton style=background-color:linen onClick=openAddTexture()><i>Textures</i></button>
<button title="Add Gradients" onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddGradientButton style=background-color:linen onClick=openAddGradient()><i>Gradients</i></button>
<button title="Create a schematic" onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddSchematicButton style=background-color:#E0CAEA onClick=openAddSchematicDraw();startSchematicDraw() ><i>Schematics</i></button>
<button title="Import image from your computer as background template" onmouseover=this.style.borderColor="lime" onmouseout=this.style.borderColor='' id=openAddBGimageButton style=background-color:ghostwhite onClick=openAddBGimage() >Template Image</button>
</div>
</center>
<div id=schematicHelpLibraryDiv style='visibility:hidden;position:absolute;top:60px;left:10px;width:360px;height:1px;background:#E0CAEA;;border:1px solid blue;border-radius:15px;padding:10px;overflow:hidden'>
<table style=width:100%><td style=width:90%; align=center><h7><b>Tile Schematic Library</b></h7></td><td align=right><button onclick=closeSchematicHelp()>X</button></td></table>
<br><div style=text-align:justify>
Schematics are custom SVG drawings for a segment of your tile drawing.<p></p>
You may copy one or more schematics from the library into your drawing. The schematic can be modified within your drawing as needed.
</div><br>
<button style=background:#E0CAEA>Tile Schematics</button> -
Selecting this will show images of all custom schematics currently in the library. Click on the image in the table to add the schematic to your drawing.
Then <b>right-click</b> on the added schematic to drag, copy, and resize it, followed by selecting <button>finish</button>.
<p></p> <b>Creating A Schematic</b> - Also, you can
create a schematic from a segment of your tiling drawing via <button style=background:#E0CAEA>Schematics</button>.
<hr>
<p></p> <b>Adding Your Schematic to Library</b> - You can
send a segment of your SVG drawing as a schematic to the library for use by others via <button style=background:#E0CAEA>Schematics</button>.
<p></p> <b>Remove Your Schematic from Library</b> - After you have sent a schematic to the library, you may remove it at any time.
All of your added schematics are listed in a table at the bottom of the Schematic Library symbols. Select <button style=background:red>remove</button> to delete the symbol from the library.
<p></p>
Copy this library for your use: <a href="LIBRARY/Schematic.svg" target="_blank">Schematic.svg</a>
</div>
<div id=tessellateHelpDiv style='visibility:hidden;position:absolute;top:60px;left:10px;width:360px;height:1px;;border:1px solid blue;border-radius:15px;padding:10px;overflow:hidden;background:#a7fc00;'>
<table style=width:100%><td style=width:90%; align=center><h7><b>Tile Tessellations</b></h7></td><td align=right><button onclick=closeTessellateHelp()>X</button></td></table>
<br><div style=text-align:justify>
Each Each Tile Unit includes 2 or more regular polygons.
Tile Units can be arranged to tessellate, showing a symmetrical arrangement of the tile units.
<p></p>
There are 1000 tile units to choose from.
<center>Tile Unit:<br><img src="Images/tessellate.svg" width=50 height=70 />
<br>Tessellation:<br><img src="Images/tessellate.png" width=260 height=260 />
</center>
</div><br>
</div>
<div id=elemSizeDiv
style='box-shadow: 4px 4px 4px #888888;-webkit-box-shadow:2px 3px 4px #888888;
font-size:80%;z-index:20;padding:4px;position:absolute;top:0px;left:0px;visibility:hidden;
background-color:linen;border: solid 1px black;border-radius:5px;cursor:default;'>
</div>
<div id=savedTextureDiv style='padding:5px;border-radius:8px;border:2px lightblue solid;visibility:hidden;background:linen;position:fixed;top:5px;left:400px;width:800px;height:70px;overflow-y:hidden;'>
<table id=savedTextureTable ><tr align=center></tr></table>
</div>
<div id=schematicTableDiv style='padding:10px;border:1px solid blue;background:#bfff00;visibility:hidden;width:370px;height:540px;overflow-y:auto;position:absolute;top:5px;left:10px'>
<table style=width:100%><tr><td style=width:90% align=center><b>Schematic Library</b></td><td align=right></td></tr></table>
<table id=schematicTable border=1 style=border-collapse:collapse;width:100% ></table>
<br>
Remove Your Schematic(s) from Library:
<table class="copySource" id=schematicListTable border=1 style='width:100%;display:none;border-collapse:collapse' cellpadding=5>
</table>
<button title="Close Schematic Library" id=schematicTableCloseButton onmouseover=this.style.background="red" onmouseout=this.style.background="" style='visibility:hidden;position:fixed;top:70px;left:345px' onclick=closeSchematicTable() >X</button>
</div>
<div style='position:fixed;top:5px;left:95%'><button onClick=zoomDrawing() title="Mousewheel Zoom Drawing" id=zoomButton style='background:transparent;border:0px;width:30px;height:30px;padding:0px'><img src="Images/zoomButton.png" width=25 height=25 alt="SVG HMI Zoom SCADA Graphs" /></button> <button onClick=openZoomHelp() style=width:20px;height:20px;padding:0px;border:0px;background:transparent ><img src="Images/help.png" width=20 height=20 alt="Zoom Scada Drawing" /></button> </div>
<div id=zoomHelpDiv style='background:white;visibility:hidden;position:fixed;top:60px;left:70%;width:300px;height:1px;border:1px solid blue;border-radius:5px;padding:10px;overflow:hidden'>
<table style=width:100%><td style=width:90%; align=center><h7><b>Mousewheel Zoom</b></h7></td><td align=right><button onclick=closeZoomHelp()>X</button></td></table>
<div style=text-align:justify>
Select this to zoom into the drawing via the mousewheel.<p></p>When zoomed you may drag/drop any element: With the cursor
over the element<img align=center src="Images/rightClick.png" alt="" width="45" height="65" /> <b>right-click</b> the mouse button, then drag the element.
<p></p>
To close the Mousewheel zoom feature, click the red zoom button symbol.
<img align=left src="Images/zoomRedButton.png" alt="" width="25" height="25" />
</div>
</div>
<div id=previewTessellateFrameDiv style='top:20px;left:0px;padding:0px;position:absolute;visibility:hidden;width:400px;height:660px;'><iframe id=previewTessellateFrame style='width:400px;height:660px' scrolling='yes' frameborder='0' ></iframe></div>
<div id=publishMobileDiv style='background:lightgreen;visibility:hidden;position:fixed;top:80px;left:40%;width:400px;height:1px;border:1px solid blue;border-radius:5px;padding:10px;overflow:hidden'>
<table style=width:100%><td style=width:90%; align=center><h7><b>Publish SVG Drawing: Mobile-Friendly</b></h7></td><td align=right><button onclick=closeMobileHelp()>X</button></td></table>
<div style=text-align:justify>
Excellent mobile-friendly interactive SVG zoom/pan<br>
The following is the typical HTML source at your website's web page to publish your drawing for mobile units.
<center>Copy (Ctrl-C) the below:</center>
<textarea style='width:400px;height:400px;font-size:80%;'>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Zoom SVG Drawing using Leaflet</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" crossorigin=""></script>
</head>
<body onload=init() style='padding:0px;font-family:arial'>
<div style=position:absolute;top:0px;left:0px id="MyDrawing" ></div>
<script id=myScript>
var MyDrawing = L.map('MyDrawing', {
crs: L.CRS.Simple,
zoomControl:false //--remove +- buttons---
});
function init()
{
var myDiv=document.getElementsByTagName("div")[0]
myDiv.style.width=window.innerWidth+"px"
myDiv.style.height=window.innerHeight+"px"
var bounds = [[0,0], [window.innerWidth,window.innerHeight]];
var image = L.imageOverlay('mySVGFile.svg', bounds).addTo(MyDrawing);
MyDrawing.fitBounds(bounds);
}
</script>
</body>
</html>
</textarea>
</div>
</div>
</body>
<script>
document.addEventListener("onload",init(),false)
function init()
{
initD3Svg()
createGridLayer()
// loadOpenerSCADA()
startCursorLoc()
writeEM()
showSourceSVG()
showSaveSVG()
$(".copy").children().bind('contextmenu', function(e){
e.stopPropagation();
});
$(".copySource").bind('contextmenu', function(e){
e.stopPropagation();
});
var cookieNameSet=getCookie("name")
var cookieEmailSet=getCookie("email")
if(cookieNameSet&&cookieEmailSet)
setCookieValues(cookieNameSet,cookieEmailSet)
d3.select("#textSVG").transition().duration(5000).attr("opacity",0)
setTimeout('mySVG.removeChild(textSVG)',5000)
previewTessellateFrame.src = "AddElem/Tessellate/SVGTile/previewTessellateFrame.htm"
}
function setSVGSizeButtonClicked()
{
var svgWidth=svgWidthValue.value
var svgHeight=svgHeightValue.value
svgDiv.style.width=svgWidth+"px"
svgDiv.style.height=svgHeight+"px"
mySVG.setAttribute("width",svgWidth)
mySVG.setAttribute("height",svgHeight)
mySVG.setAttribute("viewBox", "0 0 "+svgWidth+" "+svgHeight)
createGridLayer()
showSourceSVG()
showSaveSVG()
}
document.addEventListener('contextmenu', event => event.preventDefault());
function base64Plus()
{
var xhr = new XMLHttpRequest();
xhr.open("GET", "Images/plusRound.png", true);
xhr.responseType = "blob";
xhr.onload = function (e) {
var reader = new FileReader();
reader.onload = function(event) {
var res = event.target.result;
}
var file = this.response;
reader.readAsDataURL(file)
};
xhr.send()
}
function base64Minus()
{
var xhr = new XMLHttpRequest();
xhr.open("GET", "Images/minusRound.png", true);
xhr.responseType = "blob";
xhr.onload = function (e) {
var reader = new FileReader();
reader.onload = function(event) {
var res = event.target.result;
console.log(res)
}
var file = this.response;
reader.readAsDataURL(file)
};
xhr.send()
}
function writeEM()
{
var em="Contact: "
em+="fhem"
em+="sher"
em+="@"
em+="gm"
em+="ail."
em+="com"
emDiv.innerHTML=em +" <span style=color:maroon>Last Update: 12/16/2018</span>"
}
function openMobileHelp()
{
var height=publishMobileDiv.scrollHeight
d3.select("#publishMobileDiv").transition().duration(500).style("height", height+"px")
publishMobileDiv.style.visibility="visible"
}
function closeMobileHelp()
{
var height=1
d3.select("#publishMobileDiv").transition().duration(500).style("height", height+"px")
setTimeout('publishMobileDiv.style.visibility="hidden"',600)
}
</script>
</html>