-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
2061 lines (1982 loc) · 123 KB
/
index.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
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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<style type="text/css">
body {
max-width: 1450px;
margin: 2em auto 0;
}
main {
}
aside {
}
/* aside > svg {
widows: 100%;
} */
.flex-form {
display: flex;
flex-wrap: wrap;
}
.flex-form,
.flex-form * {
font-size: 20px;
color: purple;
}
.flex-form .group,
.flex-form .field {
box-sizing: border-box;
}
.flex-form .group {
display: flex;
flex-direction: column;
}
.flex-form > :nth-child(4n + 0) {
border: solid 1px rgb(168, 168, 168);
background: rgb(226, 226, 226);
}
.flex-form > :nth-child(4n + 1) {
border: solid 1px rgb(129, 129, 129);
background: rgb(209, 209, 209);
}
.flex-form > :nth-child(4n + 2) {
border: solid 1px rgb(220, 202, 250);
background: rgb(244, 236, 255);
}
.flex-form > :nth-child(4n + 3) {
border: solid 1px rgb(208, 180, 252);
background: rgb(232, 215, 252);
}
.flex-form .field {
position: relative;
min-width: 18em;
max-width: 30em;
padding: 0.3em 1em;
}
.flex-form .group .group .field {
min-width: 9em;
max-width: 15em;
padding: 0.3em 1em;
}
.flex-form > .group,
.flex-form > .field {
flex-grow: 1;
flex-basis: 15em;
}
.flex-form > .group > .group {
flex-grow: 0.5;
flex-basis: 7.5em;
}
.flex-form .field label {
}
.flex-form .field em {
width: 5.7em;
padding: 0 0.4em;
float: right;
text-align: right;
}
.flex-form .field input:not([type="radio"]) {
width: 5.7em;
padding: 0 0.4em;
float: right;
border-radius: 0.4em;
border: solid 0;
background: transparent;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) inset, rgba(255, 255, 255, 0.7) 1px 1px 2px;
}
.flex-form .field fieldset :not(:first-of-type) {
border-left: 1px solid #a56ac0;
}
.flex-form .field fieldset :first-of-type {
padding-left: 0.4em;
}
.flex-form .field fieldset :last-of-type {
padding-right: 0.4em;
}
.flex-form .field fieldset {
padding: 0;
overflow: hidden;
border: 1px solid purple;
background: rgb(201, 177, 212);
border-radius: 1em;
float: right;
display: inline-flex; /*ignores whitespace*/
}
.flex-form .field fieldset label {
padding: 0 0.2em;
line-height: 1.7em;
text-align: super;
color: rgb(165, 106, 192);
}
.flex-form .field fieldset input {
display: none;
}
.flex-form .field fieldset input:checked + label {
background: rgb(165, 106, 192);
text-shadow: rebeccapurple 1px 1px;
color: rgb(240, 236, 241);
}
.flex-form .field abbr {
position: absolute;
right: 2.3em;
}
.flex-form .field.spacer {
visibility: hidden;
}
.flex-form .command {
display: flex;
flex-wrap: wrap-reverse;
justify-content: space-evenly;
background: transparent;
border: transparent;
}
.flex-form .command button,
.flex-form .command a {
flex-grow: 0;
height: 1.8em;
}
.flex-form .field fieldset label[for="GreenTheme"],
.flex-form .field fieldset label[for="RedTheme"],
.flex-form .field fieldset label[for="BlueTheme"],
.flex-form .field fieldset label[for="BlackTheme"] {
min-width: 2em;
color: rgba(0, 0, 0, 0);
text-align: center;
}
.flex-form .field fieldset label[for="GreenTheme"] {
background: #88c1a4;
}
.flex-form .field fieldset input:checked + label[for="GreenTheme"] {
background: #00a650;
}
.flex-form .field fieldset label[for="RedTheme"] {
background: #e5a8aa;
}
.flex-form .field fieldset input:checked + label[for="RedTheme"] {
background: #e63138;
}
.flex-form .field fieldset label[for="BlueTheme"] {
background: #8fc2d6;
}
.flex-form .field fieldset input:checked + label[for="BlueTheme"] {
background: #31b3e6;
}
.flex-form .field fieldset label[for="BlackTheme"] {
background: #535353;
}
.flex-form .field fieldset input:checked + label[for="BlackTheme"] {
background: #1d1d1d;
}
</style>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
</head>
<body>
<main>
<div class="flex-form">
<div class="group">
<div class="field">
<label for="WidthTotal" title="Outer Width">Width</label><abbr>mm</abbr>
<input id="WidthTotal" type="number" value="140" min="40" max="400" title="Outer Width" />
</div>
<div class="field">
<label for="LengthTotal" title="Outer Length">Length</label><abbr>mm</abbr>
<input id="LengthTotal" type="number" value="229" min="40" max="600" title="Outer Length" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Include pouch sides?">Corner Rounding</label>
<fieldset>
<input id="IncludeCornerRounding" name="CornerRounding" type="radio" value="true" title="Include corner rounding on the pouch?" data-show="#CornerRoundingRadiusSection" />
<label for="IncludeCornerRounding" title="Adds a corner rounding to the pouch">yes</label>
<input id="ExcludeCornerRounding" name="CornerRounding" type="radio" value="false" checked title="No corner rounding on the pouch?" data-hide="#CornerRoundingRadiusSection" />
<label for="ExcludeCornerRounding" title="No corner rounding on the pouch">no</label>
</fieldset>
</div>
<div id="CornerRoundingRadiusSection" class="field">
<label for="CornerRoundingRadius" title="The radius of the pouch corners">Radius</label><abbr>mm</abbr>
<input id="CornerRoundingRadius" type="number" value="5" min="5" max="25" title="The radius of the pouch corners" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Pouch can stand on end?">Gusset</label>
<fieldset>
<input id="IncludeGussetRounded" name="GussetMain" type="radio" value="Rounded" title="Adds a gusset to the bottom of the pouch. Pouch can be stood up" data-show="#GussetDepthSection, #SidesWidthSection>em" data-vanish="#SidesWidthSection>input,#SidesWidthSection>abbr" />
<label for="IncludeGussetRounded" title="Pouch can stand on end?">rounded</label>
<input id="IncludeGussetK" name="GussetMain" type="radio" value="K" title="Adds a gusset to the bottom of the pouch. Pouch can be stood up" data-show="#GussetDepthSection, #SidesWidthSection>em" data-vanish="#SidesWidthSection>input,#SidesWidthSection>abbr" />
<label for="IncludeGussetK" title="Pouch can stand on end?"> k </label>
<input id="ExcludeGusset" name="GussetMain" type="radio" value="false" checked title="No gusset on the pouch" data-hide="#GussetDepthSection" data-show="#SidesWidthSection>input,#SidesWidthSection>abbr" data-vanish="#SidesWidthSection>em" />
<label for="ExcludeGusset" title="Pouch can stand on end?">none</label>
</fieldset>
</div>
<div id="GussetDepthSection" class="field">
<label for="GussetDepth" title="Gusset overal size from front face to back face including seal">Size</label><abbr>mm</abbr>
<input id="GussetDepth" type="number" value="76" min="10" max="400" title="Gusset depth including seal" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Include pouch sides?">Sides</label>
<fieldset>
<input id="IncludeSides" name="Sides" type="radio" value="true" title="Include left and right sides on the pouch?" data-show="#SidesWidthSection" />
<label for="IncludeSides" title="Adds a left and right side to the pouch">yes</label>
<input id="ExcludeSides" name="Sides" type="radio" value="false" checked title="No left and right sides on the pouch?" data-hide="#SidesWidthSection" />
<label for="ExcludeSides" title="No left and right side on the pouch">no</label>
</fieldset>
</div>
<div id="SidesWidthSection" class="field">
<label for="SideWidth" title="The width of each pouch side from the front of the pouch to the back">Width</label><abbr>mm</abbr>
<input id="SideWidth" type="number" value="70" min="40" max="600" title="The width of each pouch side" />
<em title="Side widths are matched to gusset size; change the gusset size or turn off gusset to adjust widths">see gusset</em>
</div>
</div>
<div class="group">
<div class="field">
<label title="How pouch will be sealed">Seal Placement</label>
<fieldset>
<input id="SealTopSides" name="SealPlacement" type="radio" value="Top,Left,Right" title="Top and sides will be sealed" />
<label for="SealTopSides" title="Apply a top and side seals?">top</label>
<input id="SealBottomSides" name="SealPlacement" type="radio" value="Bottom,Left,Right" checked title="Bottom and sides will be sealed" />
<label for="SealBottomSides" title="Apply a bottom and side seals?">bottom</label>
<input id="SealSidesOnly" name="SealPlacement" type="radio" value="Left,Right" title="Sides will be sealed" />
<label for="SealSidesOnly" title="Apply only side seals?">sides</label>
</fieldset>
</div>
<div class="field">
<label for="SealSize" title="The amount of edge material used for sealing the pouch">Seal Size</label>
<abbr>mm</abbr><input id="SealSize" type="number" value="7.5" min="5" step="0.1" title="The amount of edge material used for sealing the pouch" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Include a zipper for reclosing the pouch?">Zipper</label>
<fieldset>
<input id="IncludeStandardZipper" name="ZipperMain" type="radio" value="Standard" title="Include a standard zipper for reclosing the pouch?" data-show="#ZipperOffsetSection" data-hide="#ZipperFacetSection" />
<label for="IncludeStandardZipper" title="Adds a standard zipper to the pouch">standard</label>
<input id="IncludeEasyPullZipper" name="ZipperMain" type="radio" value="EasyPull" title="Include an easy-pull zipper for reclosing the pouch?" data-show="#ZipperOffsetSection,#ZipperFacetSection" />
<label for="IncludeEasyPullZipper" title="Adds an easy-pull zipper to the pouch">ez-pull</label>
<input id="IncludeChildResistantZipper" name="ZipperMain" type="radio" value="ChildResistant" title="Include a child-resistant zipper for reclosing the pouch?" data-show="#ZipperOffsetSection" data-hide="#ZipperFacetSection" />
<label for="IncludeChildResistantZipper" title="Adds a child-reistant zipper to the pouch">saftey</label>
<input id="ExcludeZipper" name="ZipperMain" type="radio" value="false" checked title="No zipper for reclosing the pouch?" data-hide="#ZipperOffsetSection,#ZipperFacetSection" />
<label for="ExcludeZipper" title="No zipper on the pouch">none</label>
</fieldset>
</div>
<div id="ZipperOffsetSection" class="field">
<label for="ZipperOffset" title="The distance from the edge of the pouch to the top of the zipper">Offset</label><abbr>mm</abbr>
<input id="ZipperOffset" type="number" value="25" title="The distance from the edge of the pouch to the top of the zipper" />
</div>
<div id="ZipperFacetSection" class="field">
<label title="Which bag side to place the zipper on?">Placement</label>
<fieldset>
<input id="ZipperFacetFront" name="ZipperFacet" type="radio" value="Front" checked title="Add zipper to the front of the pouch?" />
<label for="ZipperFacetFront" title="Adds zipper to front">front</label>
<input id="ZipperFacetBack" name="ZipperFacet" type="radio" value="Back" title="Add zipper to the back of the pouch?" />
<label for="ZipperFacetBack" title="Adds zipper to back">back</label>
</fieldset>
</div>
</div>
<div class="group">
<div class="field">
<label for="" title="Include a tear notch for easy pouch opening?">Tear Notch</label>
<fieldset>
<input id="IncludeNotch" name="Notch" type="radio" value="true" title="Include a tear notch for easy pouch opening?" data-show="#NotchOffsetSection" />
<label for="IncludeNotch" title="Adds a tear notch to the pouch">yes</label>
<input id="ExcludeNotch" name="Notch" type="radio" value="false" checked title="No tear notch for easy opening of the pouch?" data-hide="#NotchOffsetSection" />
<label for="ExcludeNotch" title="No tear notch on the pouch">no</label>
</fieldset>
</div>
<div id="NotchOffsetSection" class="field">
<label for="NotchOffset" title="The distance from the edge of the pouch to the center of the tear notch">Notch Offset</label>
<abbr>mm</abbr>
<input id="NotchOffset" type="number" value="20" title="he distance from the edge of the pouch to the center of the tear notch" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Include a hang hole for easy pouch opening?">Hang Hole</label>
<fieldset>
<input id="IncludeHole" name="Hole" type="radio" value="true" title="Include a hole for hanging the pouch?" data-show="#HoleOffsetSection" />
<label for="IncludeHole" title="Adds a hang hole to the pouch">yes</label>
<input id="ExcludeHole" name="Hole" type="radio" value="false" checked title="No hole for hanging the pouch?" data-hide="#HoleOffsetSection" />
<label for="ExcludeHole" title="No hang hole on the pouch">no</label>
</fieldset>
</div>
<div id="HoleOffsetSection" class="field">
<label for="HoleOffset" title="The distance from the edge of the pouch to the top of the hang hole">Hang Hole Offset</label><abbr>mm</abbr>
<input id="HoleOffset" type="number" value="8" min="6" max="40" title="The distance from the edge of the pouch to the top of the hang hole" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Include a degasser valve?">Degas Valve</label>
<fieldset>
<input id="IncludeDegasserFront" name="DegasserMain" type="radio" value="Front" title="Add degassing valve to the front of the pouch?" data-show="#DegasserOffsetSection" />
<label for="IncludeDegasserFront" title="Adds degassing valve to front">front</label>
<input id="IncludeDegasserBack" name="DegasserMain" type="radio" value="Back" checked title="Add degassing valve to the back of the pouch?" data-show="#DegasserOffsetSection" />
<label for="IncludeDegasserBack" title="Adds degassing valve to back">back</label>
<input id="ExcludeDegasser" name="DegasserMain" type="radio" value="false" checked title="No degasser valve?" data-hide="#DegasserOffsetSection" />
<label for="ExcludeDegasser" title="No degasser valve on the pouch">none</label>
</fieldset>
</div>
<div id="DegasserOffsetSection" class="field">
<label for="DegasserOffset" title="The distance from the edge of the pouch to the top of the degassing valve">Degas Valve Offset</label><abbr>mm</abbr>
<input id="DegasserOffset" type="number" value="60" min="18" max="400" title="The distance from the edge of the pouch to the top of the degasser valve" />
</div>
</div>
<div class="group">
<div class="field">
<label title="Color theme?">Color Theme</label>
<fieldset>
<input id="GreenTheme" name="ColorTheme" type="radio" value="theme-green" checked title="Use a green theme?" />
<label for="GreenTheme" title="Applies a green theme">_</label>
<input id="RedTheme" name="ColorTheme" type="radio" value="theme-red" title="Use a red theme?" />
<label for="RedTheme" title="Applies a red theme">_</label>
<input id="BlueTheme" name="ColorTheme" type="radio" value="theme-blue" title="Use a blue theme?" />
<label for="BlueTheme" title="Applies a blue theme">_</label>
<input id="BlackTheme" name="ColorTheme" type="radio" value="theme-black" title="Use a black theme?" />
<label for="BlackTheme" title="Applies a black theme">_</label>
</fieldset>
</div>
<div class="field">
<label> </label>
</div>
</div>
<div class="group">
<div class="field">
<label title="Include inking details?">Inking Details</label>
<fieldset>
<input id="IncludeInkingDetails" name="InkingDetails" type="radio" value="true" title="Includes inking details?" data-show="#FinishSection" />
<label for="IncludeInkingDetails" title="Adds inking details">yes</label>
<input id="ExcludeInkingDetails" name="InkingDetails" type="radio" value="false" checked title="No inking details?" data-hide="#FinishSection" />
<label for="ExcludeInkingDetails" title="No inking details">no</label>
</fieldset>
</div>
<div id="FinishSection" class="field">
<label title="Choose the desired ink finish.">Finish</label>
<fieldset>
<input id="GlossFinish" name="Finish" type="radio" value="gloss" title="Apply a gloss finish to the pouch?" />
<label for="GlossFinish" title="Applies a gloss finish to the pouch">gloss</label>
<input id="MatteFinish" name="Finish" type="radio" value="matte" title="Apply a matte finish to the pouch?" />
<label for="MatteFinish" title="Applies a matte finish to the pouch">matte</label>
<input id="CustomFinish" name="Finish" type="radio" value="custom" checked title="Apply a custom finish to the pouch?" />
<label for="CustomFinish" title="Applies a custom finish to the pouch">custom</label>
</fieldset>
</div>
</div>
<div class="group">
<div class="field">
<label title="Include additional labels?">Labeling Verbosity</label>
<fieldset>
<input id="StandardLabelingVerbosity" name="LabelingVerbosity" type="radio" value="standard" checked title="No additional labels?" />
<label for="StandardLabelingVerbosity" title="No additional labels">standard</label>
<input id="DetailedLabelingVerbosity" name="LabelingVerbosity" type="radio" value="detailed" title="Include additional labels?" />
<label for="DetailedLabelingVerbosity" title="Additional Labels">detailed</label>
</fieldset>
</div>
<div class="field">
<label> </label>
</div>
</div>
<div class="field command">
<button id="Download" style="margin-top: 1em">Download</button>
</div>
<div class="spacer field">
<label></label>
<fieldset></fieldset>
</div>
<div class="spacer field">
<label></label>
<fieldset></fieldset>
</div>
<div class="spacer field">
<label></label>
<fieldset></fieldset>
</div>
</div>
</main>
<aside></aside>
<script>
class _Elements {
_elements;
constructor(domElements) {
this._elements = domElements;
}
get length() {
return this._elements.length;
}
appendTo(_newParent) {
$(this._elements).appendTo($(_newParent._elements));
return this;
}
attr(name, value) {
this._elements.forEach((el) => {
el.setAttribute(name, value);
});
return this;
}
children(selector) {
return new _Elements($.makeArray($(this._elements).children(selector)));
}
clone() {
return new _Elements($.makeArray($(this._elements).clone()));
}
create(elementName, prepend) {
var elements = [];
this._elements.forEach((el) => {
let newEl = document.createElementNS("http://www.w3.org/2000/svg", elementName);
if (prepend) el.prepend(newEl);
else el.appendChild(newEl);
elements.push(newEl);
});
return new _Elements(elements);
}
// create2(elementName) {
// var elements = [];
// this._elements.forEach((el) => {
// let newEl = document.createElementNS("http://www.w3.org/2000/svg", elementName);
// el.appendChild(newEl);
// elements.push(newEl);
// });
// return new _Elements(elements);
// }
find(selector) {
return new _Elements($.makeArray($(this._elements).find(selector)));
}
remove() {
$(this._elements).remove();
return this;
}
text(innerText) {
$(this._elements).text(innerText);
return this;
}
toggleClass(classes) {
$(this._elements).toggleClass(classes);
return this;
}
}
function _(selector) {
return new _Elements($.makeArray($(selector)));
}
</script>
<script type="module">
import { PouchTemplate } from "./js/templates/PouchTemplate.js";
import { Placement } from "./js/enums/Placement.js";
import { ZipperType } from "./js/enums/ZipperType.js";
import { GussetType } from "./js/enums/GussetType.js";
import { FacetPlacement } from "./js/enums/FacetPlacement.js";
let pouch = PouchTemplate.getDefault(UpdateSvg);
let layout = new (class {
_themeClass = "theme-green";
_verboseLabels = false;
_inkingDetails = true;
_finish = "custom";
_changed = false;
_frozen = false;
get themeClass() {
return this._themeClass;
}
set themeClass(value) {
if (this._themeClass != value) this._changed = true;
this._themeClass = value;
}
get verboseLabels() {
return this._verboseLabels;
}
set verboseLabels(value) {
if (this._verboseLabels != value) this._changed = true;
this._verboseLabels = value;
}
get inkingDetails() {
return this._inkingDetails;
}
set inkingDetails(value) {
if (this._inkingDetails != value) this._changed = true;
this._inkingDetails = value;
}
get finish() {
return this._finish;
}
set finish(value) {
if (this._finish != value) this._changed = true;
this._finish = value;
}
get changed() {
return this._changed;
}
set changed(value) {
this._changed = value;
}
get themeClass() {
return this._themeClass;
}
get themeClass() {
return this._themeClass;
}
get frozen() {
return this._frozen;
}
freeze() {
this._frozen = true;
}
unfreeze() {
this._frozen = false;
}
})();
console.log(layout);
let svgNotchLarge = "m4.5 0 0-9-4.5-5.5-4.5 5.5 0 9z";
let svgArrowLarge = "m0 0c2.57 10.57 3.37 12.44 4.29 14.75l-8.77 0c.39-.83 1.73-4.18 2.59-7.05.93-3.08 1.57-5.87 1.79-7.68";
let svgArrowSmall = "m0 0c-1.7 6.86-2.22 8.07-2.82 9.56h5.67c-.25-.53-1.11-2.7-1.68-4.62-.6-1.99-1.04-3.79-1.16-4.97";
let svgX =
"m186 306c-8-8-27.5-32-44-54-16-22-31-40.5-33-41.5-2-.5-12.5 17-23 39.5-22 44.5-37.5 60-50 49.5-4-3.5-7.5-9-7.5-12.5 0-3.5 12-31 27-61.5l27.5-55.5-27-45c-44.5-73.5-60.5-108.5-53-117 3-4 10-7 14.5-6 4.5 1 10 2 12 2 2 .5 18.5 29.5 37.5 65.5 18.5 35.5 35 65 36.5 65 1.5-.5 10-13 19-29 9-16 24-37 33.5-47.5 15.5-16.5 18.5-18 27.5-12.5 5.5 3.5 10 7.5 10 9.5 0 1.5-14.5 27-32.5 57-18 29.5-32.5 56.5-32.5 59.5 0 3 18 29 40 58 62 80.5 58.5 75 47.5 83-12.5 9.5-14 9-30-6.5z";
let svgCheck =
"m210 13c-19 16.5-72.5 109.5-95.5 165.5-11 26.5-21 48-22.5 48-1.5 0-12.5-14-25-31-12.5-17-26.5-31.5-31.5-32.5-13-2.5-33.5 3-33.5 9 0 2.5 10.5 16.5 24 31 13 14.5 30.5 37.5 38.5 50.5 13.5 21.5 16.5 23.5 32 22.5 16.5-1.5 17.5-2.5 40.5-59.5 26.5-65.5 49-108.5 88.5-165.5 14.5-21.5 26.5-41.5 26.5-44 0-9.5-29.5-5-42 6z";
//radio event binding
$("[data-show]").on("change", function (ev) {
let $t = $(ev.target).filter(":checked");
if ($t.length) showByData($t.data("show"));
});
$("[data-hide]").on("change", function (ev) {
//hidden is visibility:hidden;
let $t = $(ev.target).filter(":checked");
if ($t.length) hideByData($t.data("hide"));
});
$("[data-vanish]").on("change", function (ev) {
//vanished is display:none;
let $t = $(ev.target).filter(":checked");
if ($t.length) vanishByData($t.data("vanish"));
});
function ensureShown() {
$("[data-show]:checked").each((i, el) => {
showByData($(el).data("show"));
});
}
function ensureHidden() {
$("[data-hide]:checked").each((i, el) => {
hideByData($(el).data("hide"));
});
}
function ensureVanished() {
$("[data-vanish]:checked").each((i, el) => {
vanishByData($(el).data("vanish"));
});
}
function showByData(selector) {
$(selector).css("visibility", "").css("display", "");
ensureHidden();
ensureVanished();
}
function hideByData(selector) {
$(selector).css("visibility", "hidden");
}
function vanishByData(selector) {
$(selector).css("display", "none");
}
//initialize show/hide based on current checks (show before hide i.e. (show + show == show, show + hide == hide, hide + hide == hide))
ensureShown();
//--load svg--//
console.log(pouch); //TODO: remove;
CreateSvg();
UpdateSvg(); //update once after creating
//--bindings--//
$("#WidthTotal").on("change", function (ev) {
pouch.front.width.value = ev.target.value * 1;
});
$("#LengthTotal").on("change", function (ev) {
pouch.front.height.value = ev.target.value * 1;
});
$("#IncludeCornerRounding").on("change", function (ev) {
pouch.corners.included = ev.target.checked;
});
$("#ExcludeCornerRounding").on("change", function (ev) {
pouch.corners.included = !ev.target.checked;
});
$("#CornerRoundingRadius").on("change", function (ev) {
pouch.corners.radius.value = ev.target.value * 1;
});
// pouch.corners.included = $("#IncludeCornerRounding").is(":checked");
// pouch.corners.radius.value = $("#CornerRoundingRadius").val();
$("#IncludeGussetRounded").on("change", function (ev) {
pouch.gusset.included = ev.target.checked;
if (ev.target.checked) {
$("[for=SealTopSides]")
.css("text-decoration", "line-through 2px #777")
.on("click", function () {
alert("Cannot place a top seal when a gusset is included");
return false;
});
$("#SealBottomSides").click();
$("[for=SealBottomSides]").css("text-decoration", "").off("click");
}
});
$("#IncludeGussetK").on("change", function (ev) {
pouch.gusset.included = ev.target.checked;
if (ev.target.checked) {
$("[for=SealTopSides]")
.css("text-decoration", "line-through 2px #777")
.on("click", function () {
alert("Cannot place a top seal when a gusset is included");
return false;
});
$("[for=SealBottomSides]")
.css("text-decoration", "line-through 2px #777")
.on("click", function () {
alert("Cannot place a top seal when a k-gusset is included");
return false;
});
$("#SealSidesOnly").click();
}
});
$("#ExcludeGusset").on("change", function (ev) {
pouch.gusset.included = !ev.target.checked;
if (ev.target.checked) {
$("[for=SealTopSides]").css("text-decoration", "").off("click");
$("[for=SealBottomSides]").css("text-decoration", "").off("click");
}
});
if ($("#IncludeGussetRounded")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ExcludeGusset").click();
$("#IncludeGussetRounded").click();
}
if ($("#IncludeGussetK")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ExcludeGusset").click();
$("#IncludeGussetK").click();
}
$("#GussetDepth").on("change", function (ev) {
pouch.gusset.depth.value = ev.target.value * 1;
});
$("#IncludeSides").on("change", function (ev) {
pouch.left.included = ev.target.checked;
});
$("#ExcludeSides").on("change", function (ev) {
pouch.right.included = !ev.target.checked;
});
$("#SealSize").on("change", function (ev) {
pouch.seal.width.value = ev.target.value * 1;
});
$("[name=SealPlacement]").on("change", function (ev) {
if (ev.target.checked) {
pouch.seal.placements = ev.target.value.split(",").map((p) => Placement[p]);
}
});
$("#IncludeStandardZipper").on("change", function (ev) {
pouch.zipper.included = ev.target.checked;
if (pouch.zipper.included) {
pouch.zipper.type = ZipperType.Standard;
$("[for=IncludeNotch]").css("text-decoration", "").off("click");
}
});
$("#IncludeEasyPullZipper").on("change", function (ev) {
pouch.zipper.included = ev.target.checked;
if (pouch.zipper.included) {
pouch.zipper.type = ZipperType.EasyPull;
$("[for=IncludeNotch]")
.css("text-decoration", "line-through 2px #777") /////////////////////////
.on("click", function () {
alert("Cannot place a tear notch when an easy-pull zipper is included");
return false;
});
$("#ExcludeNotch").click();
}
});
$("#IncludeChildResistantZipper").on("change", function (ev) {
pouch.zipper.included = ev.target.checked;
if (pouch.zipper.included) {
pouch.zipper.type = ZipperType.ChildResistant;
$("[for=IncludeNotch]").css("text-decoration", "").off("click");
}
});
$("#ExcludeZipper").on("change", function (ev) {
pouch.zipper.included = !ev.target.checked;
if (ev.target.checked) {
$("[for=IncludeNotch]").css("text-decoration", "").off("click");
}
});
if ($("#IncludeEasyPullZipper")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ExcludeZipper").click();
$("#IncludeEasyPullZipper").click();
}
$("#ZipperOffset").on("change", function (ev) {
pouch.zipper.offset.value = ev.target.value * 1;
});
$("#ZipperFacetFront").on("change", function (ev) {
pouch.zipper.facet = FacetPlacement.Front;
});
$("#ZipperFacetBack").on("change", function (ev) {
pouch.zipper.facet = FacetPlacement.Back;
});
if ($("#ZipperFacetBack")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ZipperFacetFront").click();
$("#ZipperFacetBack").click();
}
if ($("#ZipperFacetFront")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ZipperFacetBack").click();
$("#ZipperFacetFront").click();
}
$("#IncludeNotch").on("change", function (ev) {
pouch.notch.included = ev.target.checked;
});
$("#ExcludeNotch").on("change", function (ev) {
pouch.notch.included = !ev.target.checked;
});
$("#NotchOffset").on("change", function (ev) {
pouch.notch.offset.value = ev.target.value * 1;
});
$("#IncludeHole").on("change", function (ev) {
pouch.hanger.included = ev.target.checked;
});
$("#ExcludeHole").on("change", function (ev) {
pouch.hanger.included = !ev.target.checked;
});
$("#HoleOffset").on("change", function (ev) {
pouch.hanger.offset.value = ev.target.value * 1;
});
$("#IncludeDegasserFront").on("change", function (ev) {
if (ev.target.checked) {
pouch.degasser.included = true;
pouch.degasser.facet = FacetPlacement.Front;
}
});
$("#IncludeDegasserBack").on("change", function (ev) {
if (ev.target.checked) {
pouch.degasser.included = true;
pouch.degasser.facet = FacetPlacement.Back;
}
});
$("#ExcludeDegasser").on("change", function (ev) {
pouch.degasser.included = !ev.target.checked;
});
$("#DegasserOffset").on("change", function (ev) {
pouch.degasser.offset.value = ev.target.value * 1;
});
if ($("#IncludeDegasserBack")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ExcludeDegasser").click();
$("#IncludeDegasserBack").click();
}
if ($("#IncludeDegasserFront")[0].checked) {
//toggle initial state back and forth to ensure that events and styles are added.
$("#ExcludeDegasser").click();
$("#IncludeDegasserFront").click();
}
$("#IncludeInkingDetails").on("change", function (ev) {
layout.inkingDetails = ev.target.checked;
});
$("#ExcludeInkingDetails").on("change", function (ev) {
layout.inkingDetails = !ev.target.checked;
});
$("#GlossFinish").on("change", function (ev) {
if (ev.target.checked) layout.finish = ev.target.value;
});
$("#MatteFinish").on("change", function (ev) {
if (ev.target.checked) layout.finish = ev.target.value;
});
$("#CustomFinish").on("change", function (ev) {
if (ev.target.checked) layout.finish = ev.target.value;
});
$("#StandardLabelingVerbosity").on("change", function (ev) {
layout.verboseLabels = !ev.target.checked;
});
$("#DetailedLabelingVerbosity").on("change", function (ev) {
layout.verboseLabels = ev.target.checked;
});
//--periodic model updating variables--// //NOTE: these variables must reference elements otherwise updates will not work.
let w = $("#WidthTotal")[0],
h = $("#LengthTotal")[0],
yesCorners = $("#IncludeCornerRounding")[0],
cornerRadius = $("#CornerRoundingRadius")[0],
gussetMain = $("[name=GussetMain]"),
gussetDepth = $("#GussetDepth")[0],
yesSides = $("#IncludeSides")[0],
sides = $("#SideWidth")[0],
seal = $("#SealSize")[0],
sealPlacement = $("[name=SealPlacement]"),
noZipper = $("#ExcludeZipper")[0],
zipperMain = $("[name=ZipperMain]"),
zipperOffset = $("#ZipperOffset")[0],
zipperFacet = $("[name=ZipperFacet]"),
yesNotch = $("#IncludeNotch")[0],
notch = $("#NotchOffset")[0],
yesHanger = $("#IncludeHole")[0],
hanger = $("#HoleOffset")[0],
degasserMain = $("[name=DegasserMain]"),
degasserOffset = $("#DegasserOffset")[0],
theme = $("[name=ColorTheme]"),
yesInkingDetails = $("#IncludeInkingDetails")[0],
finish = $("[name=Finish]"),
yesVerboseLabels = $("#DetailedLabelingVerbosity")[0];
(function UpdateModel() {
let main = null;
let otherSvgChange = false;
pouch.front.width.value = w.value * 1;
pouch.front.height.value = h.value * 1;
pouch.corners.included = yesCorners.checked;
pouch.corners.radius.value = cornerRadius.value * 1;
main = gussetMain.filter(":checked").val();
pouch.gusset.included = main != "false";
pouch.gusset.depth.value = gussetDepth.value * 1;
if (pouch.gusset.included) pouch.gusset.type = GussetType[main];
pouch.left.included = yesSides.checked;
pouch.left.width.value = pouch.gusset.included ? gussetDepth.value * 1 : sides.value * 1; // width is from gusset if the gusset is on
pouch.seal.width.value = seal.value * 1;
pouch.seal.placements = sealPlacement
.filter(":checked")
.val()
.split(",")
.map((p) => Placement[p]);
main = zipperMain.filter(":checked").val();
pouch.zipper.included = main != "false";
if (pouch.zipper.included) ZipperType[main];
pouch.zipper.offset.value = zipperOffset.value * 1;
if (pouch.zipper.facet == ZipperType.EasyPull) pouch.zipper.facet = FacetPlacement[zipperFacet.filter((i, el) => $(el).is(":checked")).val()];
pouch.zipper.height.value = pouch.zipper.type == ZipperType.ChildResistant ? 15 : 13;
pouch.notch.included = yesNotch.checked;
pouch.notch.offset.value = notch.value * 1;
pouch.hanger.included = yesHanger.checked;
pouch.hanger.offset.value = hanger.value * 1;
main = degasserMain.filter(":checked").val();
pouch.degasser.included = main != "false";
pouch.degasser.offset.value = degasserOffset.value * 1;
if (pouch.degasser.included) pouch.degasser.facet = FacetPlacement[main];
setTimeout(UpdateModel, 100);
layout.themeClass = theme.not(":not(:checked)")[0].value;
layout.inkingDetails = yesInkingDetails.checked;
layout.finish = finish.not(":not(:checked)")[0].value;
layout.verboseLabels = yesVerboseLabels.checked;
if (layout.changed) {
//a change not tracked by the pouch object
layout.changed = false;
UpdateSvg();
}
})();
//--create svg--//
function CreateSvg() {
let _svg = _("aside").create("svg").attr("xmlns", "http://www.w3.org/2000/svg");
let _style = _svg.create("style").attr("type", "text/css");
$.get("svg.css", function (text) {
text = text.replace(/\/\*.*\*\//g, ""); //matches single line comments
_style.text(text);
});
let _front = _svg.create("svg").attr("class", "side front").attr("overflow", "visible");
//header label//
let _header = _front.create("g").attr("class", "header");
_header.create("rect").attr("class", "label background fill dark face");
_header.create("text").attr("class", "label left fill light medium").text("FRONT");
_header.create("text").attr("class", "label center fill light medium").text("(OPENING)");
_header.create("text").attr("class", "label right fill light medium").text("TOP");
//face//
let _face = _front.create("g").attr("class", "face");
_face.create("clipPath").attr("id", "FaceUpperClip").create("rect").attr("class", "clip upper");
_face.create("clipPath").attr("id", "FaceLowerClip").create("rect").attr("class", "clip lower");
_face.create("rect").attr("class", "outline upper continuous large").attr("clip-path", "url(#FaceUpperClip)");
_face.create("rect").attr("class", "outline lower continuous large").attr("clip-path", "url(#FaceLowerClip)");
//face outer height guides//
let _outerHeight = _face.create("g").attr("class", "height outer");
_outerHeight.create("text").attr("class", "fill dark medium").attr("text-anchor", "middle").attr("transform", "rotate(-90)");
_outerHeight.create("line").attr("class", "mark top continuous medium");
_outerHeight.create("svg").attr("class", "arrow top").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill");
_outerHeight.create("line").attr("class", "arrow continuous medium");
_outerHeight.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(180)");
_outerHeight.create("line").attr("class", "mark bottom continuous medium");
//face outer width guides//
let _outerWidth = _face.create("g").attr("class", "width outer");
_outerWidth.create("text").attr("class", "fill dark medium").attr("text-anchor", "middle");
_outerWidth.create("line").attr("class", "mark left continuous medium");
_outerWidth.create("svg").attr("class", "arrow left").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(-90)");
_outerWidth.create("line").attr("class", "arrow continuous medium");
_outerWidth.create("svg").attr("class", "arrow right").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(90)");
_outerWidth.create("line").attr("class", "mark right continuous medium");
//face inner height guides//
let _innerHeight = _face.create("g").attr("class", "height inner verbosity");
_innerHeight.create("text").attr("class", "fill dark small").attr("text-anchor", "middle").attr("transform", "rotate(-90)");
_innerHeight.create("line").attr("class", "mark top continuous medium");
_innerHeight.create("svg").attr("class", "arrow top").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill");
_innerHeight.create("line").attr("class", "arrow continuous medium");
_innerHeight.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(180)");
_innerHeight.create("line").attr("class", "mark bottom continuous medium");
_innerHeight.create("svg").attr("class", "mark arrow").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill").attr("transform", "rotate(225)");
//face inner width guides//
let _innerWidth = _face.create("g").attr("class", "width inner verbosity");
_innerWidth.create("text").attr("class", "fill dark small").attr("text-anchor", "middle");
_innerHeight.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(180)");
_innerWidth.create("line").attr("class", "mark left continuous medium");
_innerWidth.create("svg").attr("class", "arrow left").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(-90)");
_innerWidth.create("line").attr("class", "arrow continuous medium");
_innerWidth.create("svg").attr("class", "arrow right").attr("overflow", "visible").create("path").attr("d", svgArrowLarge).attr("class", "fill").attr("transform", "rotate(90)");
_innerWidth.create("line").attr("class", "mark right continuous medium");
//hanger//
let _hanger = _front.create("g").attr("class", "hanger");
_hanger.create("circle").attr("class", "hole fill dark");
let _hangerOffset = _hanger.create("g").attr("class", "offset");
_hangerOffset.create("text").attr("class", "value fill dark small");
_hangerOffset.create("svg").attr("class", "arrow top").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill");
_hangerOffset.create("line").attr("class", "arrow continuous medium");
_hangerOffset.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill").attr("transform", "rotate(180)");
_hangerOffset.create("line").attr("class", "mark bottom continuous medium");
_hangerOffset.create("text").attr("class", "type verbosity fill dark small").text("Hole");
//notch//
let _notch = _front.create("g").attr("class", "notch");
_notch.create("svg").attr("class", "cut left fill dark").attr("overflow", "visible").create("path").attr("d", svgNotchLarge).attr("class", "fill").attr("transform", "rotate(90)");
_notch.create("svg").attr("class", "cut right fill dark").attr("overflow", "visible").create("path").attr("d", svgNotchLarge).attr("class", "fill").attr("transform", "rotate(-90)");
let _notchOffset = _notch.create("g").attr("class", "offset");
_notchOffset.create("text").attr("class", "value fill dark small").attr("transform", "rotate(90)");
_notchOffset.create("line").attr("class", "mark top continuous medium");
_notchOffset.create("svg").attr("class", "arrow top").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill");
_notchOffset.create("line").attr("class", "arrow continuous medium");
_notchOffset.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill").attr("transform", "rotate(180)");
_notchOffset.create("line").attr("class", "mark bottom continuous medium");
let _notchLabel = _notchOffset.create("text").attr("class", "type verbosity fill dark small");
_notchLabel.create("tspan").attr("class", "upper").text("Tear");
_notchLabel.create("tspan").attr("class", "lower").text("Notch");
//zippers//
let _zipper = _front.create("g").attr("class", "zipper");
let _straight = _zipper.create("g").attr("class", "straight");
_straight.create("rect").attr("class", "outline continuous small");
_straight.create("rect").attr("class", "inner dashed small");
let _wishbone = _zipper.create("g").attr("class", "wishbone");
_wishbone.create("clipPath").attr("id", "WishboneUpperTopClip").create("rect").attr("class", "clip top").attr("width", "7.3mm").attr("height", "4mm");
_wishbone.create("clipPath").attr("id", "WishboneMiddleClip").create("rect").attr("class", "clip middle").attr("width", "2.5mm").attr("height", "10.5mm");
_wishbone.create("clipPath").attr("id", "WishboneLowerBottomClip").create("rect").attr("class", "clip bottom").attr("width", "7.3mm").attr("height", "4mm");
_wishbone.create("circle").attr("class", "tear upper top dashed small").attr("clip-path", "url(#WishboneUpperTopClip)").attr("r", "3.5mm");
_wishbone.create("circle").attr("class", "tear upper bottom dashed small").attr("clip-path", "url(#WishboneMiddleClip)").attr("r", "3mm");
_wishbone.create("circle").attr("class", "tear lower top dashed small").attr("clip-path", "url(#WishboneMiddleClip)").attr("r", "3mm");
_wishbone.create("circle").attr("class", "tear lower bottom dashed small").attr("clip-path", "url(#WishboneLowerBottomClip)").attr("r", "3.5mm");
let _heatedClip = _wishbone.create("clipPath").attr("id", "HeatedClip");
_heatedClip.create("rect").attr("class", "clip heated").attr("width", "50mm").attr("x", "0mm").attr("y", "0mm");
_wishbone.create("rect").attr("class", "heated vertical dotted large").attr("clip-path", "url(#HeatedClip)").attr("rx", "2mm");
_wishbone.create("line").attr("class", "heated horizontal dotted large");
_wishbone.create("rect").attr("class", "outline continuous small");
_wishbone.create("rect").attr("class", "inner dashed small");
let _zipperOffset = _zipper.create("g").attr("class", "offset");
_zipperOffset.create("text").attr("class", "value fill dark small").attr("transform", "rotate(90)");
_zipperOffset.create("line").attr("class", "mark top continuous medium");
_zipperOffset.create("svg").attr("class", "arrow top").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill");
_zipperOffset.create("line").attr("class", "arrow continuous medium");
_zipperOffset.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill").attr("transform", "rotate(180)");
_zipperOffset.create("line").attr("class", "mark bottom continuous medium");
let _zipperLabel = _zipperOffset.create("text").attr("class", "type verbosity fill dark small");
_zipperLabel.create("tspan").attr("class", "upper");
_zipperLabel.create("tspan").attr("class", "lower");
//degasser//
let _degasser = _front.create("g").attr("class", "degasser");
_degasser.create("circle").attr("class", "outer dotted large");
_degasser.create("circle").attr("class", "inner continuous small");
let _degasserOffset = _degasser.create("g").attr("class", "offset");
_degasserOffset.create("text").attr("class", "value fill dark small").attr("transform", "rotate(-90)");
_degasserOffset.create("line").attr("class", "mark top continuous medium");
_degasserOffset.create("svg").attr("class", "arrow top").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill");
_degasserOffset.create("line").attr("class", "arrow continuous medium");
_degasserOffset.create("svg").attr("class", "arrow bottom").attr("overflow", "visible").create("path").attr("d", svgArrowSmall).attr("class", "fill").attr("transform", "rotate(180)");
_degasserOffset.create("line").attr("class", "mark bottom continuous medium");
let _degasserLabel = _degasserOffset.create("text").attr("class", "type verbosity fill dark small");