sketchily 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +0,0 @@
1
- module Sketchily
2
- def sketchily_show(uri, options = {})
3
- "<img src='data:image/svg+xml;base64,#{uri}' #{"width='#{options[:width]}'" if options[:width]} #{"height='#{options[:height]}'" if options[:height]}/>".html_safe
4
- end
5
-
6
- def svg_show(uri, options = {})
7
- sketchily_show(uri, options)
8
- end
9
- end
10
-
@@ -1,51 +0,0 @@
1
- <% # Clients of this partial may override the following variables:
2
- show_menu ||= false
3
- name ||= svgedit
4
- value ||= nil
5
- options ||= {}
6
- %>
7
-
8
- <script type="text/javascript" src="/assets/embedapi.js"></script>
9
- <script type="text/javascript">
10
- var svgCanvas = null;
11
-
12
- function init_embed() {
13
- var frame = document.getElementById('svgedit');
14
- svgCanvas = new embedded_svg_edit(frame);
15
- svgCanvas.setSvgString("<%= value %>");
16
-
17
- <% unless show_menu %>
18
- // Hide main button, as we will be controlling new/load/save etc from the host document
19
- var doc;
20
- doc = frame.contentDocument;
21
- if (!doc) {
22
- doc = frame.contentWindow.document;
23
- }
24
-
25
- var mainButton = doc.getElementById('main_button');
26
- mainButton.style.display = 'none';
27
- <% end %>
28
-
29
- $("form").attr("onSubmit", "return saveSvg()");
30
- }
31
-
32
- function handleSvgData(data, error) {
33
- if (error) {
34
- alert('Error: ' + error);
35
- return false;
36
- }
37
- else {
38
- $("#<%= sanitize_to_id(name) %>").attr("value", data);
39
- return true;
40
- }
41
- }
42
-
43
- function saveSvg() {
44
- return svgCanvas.getSvgString()(handleSvgData);
45
- }
46
- </script>
47
-
48
- <iframe src="/assets/svg-editor" width="900px" height="600px" id="svgedit" onload="init_embed()"></iframe>
49
-
50
- <%= tag :input, { "type" => "hidden", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys) %>
51
-
@@ -1,35 +0,0 @@
1
- <% # Clients of this partial may override the following variable:
2
- svgstring ||= nil
3
- %>
4
- <script type="text/javascript" src="/assets/embedapi.js"></script>
5
- <script type="text/javascript">
6
- var svgCanvas = null;
7
-
8
- function init_embed() {
9
- var frame = document.getElementById('svgedit');
10
- svgCanvas = new embedded_svg_edit(frame);
11
- svgCanvas.setSvgString(svgstring);
12
-
13
- if () {
14
- // Hide main button, as we will be controlling new/load/save etc from the host document
15
- var doc;
16
- doc = frame.contentDocument;
17
- if (!doc) {
18
- doc = frame.contentWindow.document;
19
- }
20
-
21
- var mainButton = doc.getElementById('main_button');
22
- mainButton.style.display = 'none';
23
- }
24
-
25
- function handleSvgData(data, error) {
26
- alert('Congratulations. Your SVG string is back in the host page, do with it what you will\n\n' + data);
27
- }
28
- }
29
-
30
- function saveSvg() {
31
- svgCanvas.getSvgString()(handleSvgData);
32
- }
33
- </script>
34
-
35
- <iframe src="/assets/svg-editor" width="900px" height="600px" id="svgedit" onload="init_embed()"></iframe>
@@ -1,13 +0,0 @@
1
- module SketchilyShow
2
- module ActionViewBaseInstanceMethods
3
- def sketchily_show(uri, options = {})
4
- "<img src='data:image/svg+xml;base64,#{uri}' #{"width='#{options[:width]}'" if options[:width]} #{"height='#{options[:height]}'" if options[:height]}>".html_safe
5
- end
6
-
7
- def svg_show(uri, options = {})
8
- sketchily_show(uri, options)
9
- end
10
- end
11
- end
12
-
13
- ActionView::Base.send :include, SketchilyShow::ActionViewBaseInstanceMethods
@@ -1,1500 +0,0 @@
1
- body {
2
- background: #D0D0D0;
3
- }
4
-
5
- html, body, div{
6
- -webkit-user-select: text;
7
- -khtml-user-select: text;
8
- -moz-user-select: text;
9
- -o-user-select: text;
10
- user-select: text;
11
- /* this will work for QtWebKit in future */
12
- -webkit-user-drag: text;
13
- }
14
-
15
- #browser-not-supported {
16
- font-size: 0.8em;
17
- font-family: Verdana, Helvetica, Arial;
18
- color: #000000;
19
- }
20
-
21
-
22
- #svg_editor * {
23
- transform-origin: 0 0;
24
- -moz-transform-origin: 0 0;
25
- -o-transform-origin: 0 0;
26
- -webkit-transform-origin: 0 0;
27
- }
28
-
29
- #svg_editor {
30
- font-size: 8pt;
31
- font-family: Verdana, Helvetica, Arial;
32
- color: #000000;
33
- }
34
-
35
- a {
36
- color: #19c;
37
- }
38
-
39
- hr {
40
- border: none;
41
- border-bottom: 1px solid #808080;
42
- }
43
-
44
- select {
45
- margin-top: 4px;
46
- }
47
-
48
- #svgroot {
49
- -moz-user-select: none;
50
- -webkit-user-select: none;
51
- position: absolute;
52
- top: 0;
53
- left: 0;
54
- }
55
-
56
- #svgcanvas {
57
- line-height: normal;
58
- display: inline-block;
59
- background-color: #A0A0A0;
60
- text-align: center;
61
- vertical-align: middle;
62
- width: 640px;
63
- height: 480px;
64
- -apple-dashboard-region:dashboard-region(control rectangle 0px 0px 0px 0px); /* for widget regions that shouldn't react to dragging */
65
- position: relative;
66
- /*
67
- A subtle gradient effect in the canvas.
68
- Just experimenting - not sure if this is worth it.
69
- */
70
- background: -moz-radial-gradient(45deg,#bbb,#222);
71
- background: -webkit-gradient(radial, center center, 3, center center, 1000, from(#bbb), to(#222));
72
- }
73
-
74
-
75
- /* Rulers
76
- ——————————————————————————————————————*/
77
-
78
- #rulers > div {
79
- position: absolute;
80
- background: #DDD;
81
- z-index: 1;
82
- overflow: hidden;
83
- }
84
-
85
- #ruler_corner {
86
- top: 41px;
87
- left: 41px;
88
- width: 15px;
89
- height: 15px;
90
- }
91
-
92
- #ruler_x {
93
- height: 15px;
94
- top: 41px;
95
- left: 56px;
96
- right: 30px;
97
- border-bottom: 1px solid;
98
- border-left: 1px solid #777;
99
- }
100
-
101
- #ruler_y {
102
- width: 15px;
103
- top: 55px;
104
- left: 41px;
105
- bottom: 56px;
106
- border-right: 1px solid;
107
- border-top: 1px solid #777;
108
- }
109
-
110
- #ruler_x canvas:first-child {
111
- margin-left: -16px;
112
- }
113
-
114
- #ruler_x canvas {
115
- float: left;
116
- }
117
-
118
- #ruler_y canvas {
119
- margin-top: -16px;
120
- }
121
-
122
- #ruler_x > div,
123
- #ruler_y > div {
124
- overflow: hidden;
125
- }
126
-
127
- #palette_holder {
128
- overflow: hidden;
129
- margin-top: 5px;
130
- padding: 5px;
131
- position: absolute;
132
- right: 15px;
133
- height: 16px;
134
- background: #f0f0f0;
135
- border-radius: 3px;
136
- z-index: 2;
137
- }
138
-
139
- #stroke_bg,
140
- #fill_bg {
141
- height: 16px;
142
- width: 16px;
143
- margin: 1px;
144
- }
145
-
146
- #zoomLabel {
147
- cursor: pointer;
148
- margin-right: 5px;
149
- padding-top: 4px
150
- }
151
-
152
- #linkLabel > svg {
153
- height: 20px;
154
- padding-top: 4px;
155
- }
156
-
157
- #palette {
158
- float: left;
159
- width: 632px;
160
- height: 16px;
161
- }
162
-
163
- #workarea {
164
- display: inline-table-cell;
165
- position:absolute;
166
- top: 40px;
167
- left: 40px;
168
- bottom: 40px;
169
- right: 14px;
170
- background-color: #A0A0A0;
171
- border: 1px solid #808080;
172
- overflow: auto;
173
- text-align: center;
174
- }
175
-
176
- #sidepanels {
177
- display: inline-block;
178
- position:absolute;
179
- top: 40px;
180
- bottom: 40px;
181
- right: 0px;
182
- width: 2px;
183
- padding: 10px;
184
- border-color: #808080;
185
- border-style: solid;
186
- border-width: 1px;
187
- border-left: none;
188
- }
189
-
190
- #layerpanel {
191
- display: inline-block;
192
- position:absolute;
193
- top: 1px;
194
- bottom: 0px;
195
- right: 0px;
196
- width: 0px;
197
- overflow: auto;
198
- margin: 0px;
199
- -moz-user-select: none;
200
- -webkit-user-select: none;
201
-
202
- }
203
-
204
- /*
205
- border-style: solid;
206
- border-color: #666;
207
- border-width: 0px 0px 0px 1px;
208
- */
209
- #sidepanel_handle {
210
- display: inline-block;
211
- position: absolute;
212
- background-color: #D0D0D0;
213
- font-weight: bold;
214
- left: 0px;
215
- top: 40%;
216
- width: 1em;
217
- padding: 5px 1px 5px 5px;
218
- margin-left: 3px;
219
- cursor: pointer;
220
- border-radius: 5px;
221
- -moz-border-radius: 5px;
222
- -webkit-border-radius: 5px;
223
- -moz-user-select: none;
224
- -webkit-user-select: none;
225
- }
226
-
227
- #sidepanel_handle:hover {
228
- font-weight: bold;
229
- }
230
-
231
- #sidepanel_handle * {
232
- cursor: pointer;
233
- -moz-user-select: none;
234
- -webkit-user-select: none;
235
- }
236
- #layerbuttons {
237
- margin: 0px;
238
- padding: 0px;
239
- padding-left: 2px;
240
- padding-right: 2px;
241
- width: 125px;
242
- height: 20px;
243
- border-right: 1px solid #FFFFFF;
244
- border-bottom: 1px solid #FFFFFF;
245
- border-left: 1px solid #808080;
246
- border-top: 1px solid #808080;
247
- overflow: hidden;
248
- }
249
-
250
- .layer_button {
251
- width: 14px;
252
- height: 14px;
253
- padding: 1px;
254
- border-left: 1px solid #FFFFFF;
255
- border-top: 1px solid #FFFFFF;
256
- border-right: 1px solid #808080;
257
- border-bottom: 1px solid #808080;
258
- cursor: pointer;
259
- float: left;
260
- margin-right: 3px;
261
- }
262
-
263
- .layer_button:last-child {
264
- margin-right: 0;
265
- }
266
-
267
- .layer_buttonpressed {
268
- width: 14px;
269
- height: 14px;
270
- padding: 1px;
271
- border-right: 1px solid #FFFFFF;
272
- border-bottom: 1px solid #FFFFFF;
273
- border-left: 1px solid #808080;
274
- border-top: 1px solid #808080;
275
- cursor: pointer;
276
- }
277
-
278
- #layerlist {
279
- margin: 1px;
280
- padding: 0px;
281
- width: 127px;
282
- border-collapse: collapse;
283
- border: 1px solid #808080;
284
- background-color: #FFFFFF;
285
- }
286
-
287
- #layerlist tr.layer {
288
- background-color: #FFFFFF;
289
- margin: 0px;
290
- padding: 0px;
291
- }
292
- #layerlist tr.layersel {
293
- border: 1px solid #808080;
294
- background-color: #CCCCCC;
295
- }
296
-
297
- #layerlist td.layervis {
298
- width: 22px;
299
- cursor:pointer;
300
- }
301
- #layerlist td.layerinvis {
302
- background-image: none;
303
- cursor:pointer;
304
- }
305
-
306
- #layerlist td.layervis * {
307
- display: block;
308
- }
309
-
310
- #layerlist td.layerinvis * {
311
- display: none;
312
- }
313
-
314
- #layerlist td.layername {
315
- cursor: pointer;
316
- }
317
-
318
- #layerlist tr.layersel td.layername {
319
- font-weight: bold;
320
- }
321
-
322
- #selLayerLabel {
323
- white-space: nowrap;
324
- }
325
-
326
- #selLayerNames {
327
- display: block;
328
- }
329
-
330
- div.palette_item {
331
- height: 15px;
332
- width: 15px;
333
- float: left;
334
- }
335
-
336
- div.palette_item:first-child {
337
- background: white;
338
- }
339
-
340
- /* Main button
341
- —————————————————————————————*/
342
-
343
- #main_button {
344
- position: absolute;
345
- top: 4px;
346
- left: 5px;
347
- z-index: 5;
348
- display: none;
349
- }
350
-
351
- #main_icon {
352
- position: relative;
353
- top: -2px;
354
- left: -2px;
355
- width: 95px;
356
- line-height: 26px;
357
- }
358
-
359
- #main_icon:hover {
360
- background: #eee !important;
361
- }
362
-
363
- #main_icon.buttondown {
364
- background: #eee !important;
365
- -moz-box-shadow: none !important;
366
- -webkit-box-shadow: none !important;
367
- box-shadow: none !important;
368
- border-radius: 3px 3px 0 0;
369
- }
370
-
371
- #logo {
372
- margin-top: -2px;
373
- }
374
-
375
- #logo img {
376
- border: 0;
377
- width: 28px;
378
- height: 28px;
379
- }
380
-
381
- #main_icon > div {
382
- float: left;
383
- }
384
-
385
- #main_button > div {
386
- float: left;
387
- }
388
-
389
- #main_button .dropdown {
390
- position: absolute;
391
- right: 7px;
392
- top: 4px;
393
- }
394
-
395
- #main_button .tool_sep {
396
- margin-top: 5px;
397
- }
398
-
399
- #main_icon span {
400
- position: absolute;
401
- top: 0;
402
- left: 0;
403
- bottom: 0;
404
- right: 0;
405
- display: block;
406
- z-index: 2;
407
- font-weight: bold;
408
- padding-left: 34px;
409
- line-height: 32px;
410
- font-family: sans-serif;
411
- }
412
-
413
- #main_menu {
414
- z-index: 12;
415
- background: #eee;
416
- position: relative;
417
- width: 230px;
418
- padding: 5px;
419
- -moz-box-shadow: #555 1px 1px 4px;
420
- -webkit-box-shadow: #555 1px 1px 4px;
421
- box-shadow: #555 1px 1px 4px;
422
- font-size: 1.1em;
423
- display: none;
424
- overflow: hidden;
425
- clear: both;
426
- top: -9px;
427
- }
428
-
429
- #main_menu ul,
430
- #main_menu li {
431
- list-style: none;
432
- margin: 0;
433
- padding: 0;
434
- }
435
-
436
- #main_menu li {
437
- /* height: 35px;*/
438
- line-height: 22px;
439
- padding-top: 7px;
440
- padding-left: 7px;
441
- margin: -5px;
442
- overflow: auto;
443
- cursor: default;
444
- }
445
-
446
- #main_menu li:hover {
447
- background: #FFC;
448
- }
449
-
450
- #main_menu li > div {
451
- float: left;
452
- padding-right: 5px;
453
- }
454
-
455
- #main_menu p {
456
- margin-top: 5px;
457
- }
458
-
459
- /*—————————————————————————————*/
460
-
461
- .tool_button:hover,
462
- .push_button:hover,
463
- .buttonup:hover,
464
- .buttondown,
465
- .tool_button_current,
466
- .push_button_pressed
467
- {
468
- background-color: #ffc !important;
469
- }
470
-
471
- .tool_button_current,
472
- .push_button_pressed,
473
- .buttondown {
474
- background-color: #f4e284 !important;
475
- -webkit-box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4), 1px 1px 0 white !important;
476
- -moz-box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4), 1px 1px 0 white !important;
477
- box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4), 1px 1px 0 white !important;
478
- }
479
-
480
- #tools_top {
481
- position: absolute;
482
- /*left: 108px;*/
483
- /*right: 2px;*/
484
- top: 2px;
485
- height: 40px;
486
- border-bottom: none;
487
- overflow: auto;
488
- }
489
-
490
- #tools_top .tool_sep {
491
- margin-top: 5px;
492
- }
493
-
494
- #tools_left {
495
- position: absolute;
496
- border-right: none;
497
- width: 32px;
498
- top: 40px;
499
- left: 1px;
500
- margin-top: -2px;
501
- padding-left: 2px;
502
- background: #D0D0D0; /* Needed so flyout icons don't appear on the left */
503
- z-index: 4;
504
- }
505
-
506
- #workarea.wireframe #svgcontent * {
507
- fill: none;
508
- stroke: #000;
509
- stroke-width: 1px;
510
- stroke-opacity: 1.0;
511
- stroke-dasharray: 0;
512
- opacity: 1;
513
- pointer-events: stroke;
514
- vector-effect: non-scaling-stroke;
515
- filter: none;
516
- }
517
-
518
- #workarea.wireframe #svgcontent text {
519
- fill: #000;
520
- stroke: none;
521
- }
522
-
523
- #workarea.wireframe #canvasBackground > rect {
524
- fill: #FFF !important;
525
- }
526
-
527
- #tools_top div[id$="_panel"]:not(#editor_panel):not(#history_panel) {
528
- display: none;
529
- }
530
-
531
- #editor_panel, #history_panel {
532
- height: 34px;
533
- float: left;
534
- }
535
-
536
- #multiselected_panel .selected_tool {
537
- vertical-align: 12px;
538
- }
539
-
540
- /*TODO: Adjust position of rulers are not visible*/
541
- #cur_context_panel {
542
- position: absolute;
543
- top: 57px;
544
- left: 56px;
545
- line-height: 22px;
546
- overflow: auto;
547
- padding-left: 5px;
548
- font-size: 12px;
549
- background: rgba(0, 0, 0, 0.8);
550
- color: #ccc;
551
- padding: 0 10px;
552
- border-radius: 0 0 3px 0;
553
- }
554
-
555
- #cur_context_panel a {
556
- float: none;
557
- text-decoration: none;
558
- }
559
-
560
- #cur_context_panel a:hover {
561
- text-decoration: underline;
562
- }
563
-
564
- #tools_top > div, #tools_top {
565
- line-height: 26px;
566
- }
567
-
568
- div.toolset,
569
- div.toolset > * {
570
- float: left;
571
- }
572
-
573
- div.toolset {
574
- height: 34px;
575
- }
576
-
577
- div.toolset label span {
578
- /* outline: 1px solid red;*/
579
- padding-top: 3px;
580
- display: inline-block;
581
- }
582
-
583
- #tools_top > div > * {
584
- float: left;
585
- margin-right: 2px;
586
- }
587
-
588
- #tools_left > div {
589
- float: left;
590
- margin-right: 2px;
591
- }
592
-
593
- #tools_top label {
594
- margin-top: 0;
595
- margin-left: 5px;
596
- }
597
-
598
- #tools_top input {
599
- margin-top: 5px;
600
- height: 15px;
601
- }
602
-
603
- input[type=text] {
604
- padding: 2px;
605
- }
606
-
607
- #tools_left .tool_button,
608
- #tools_left .tool_button_current {
609
- position: relative;
610
- z-index: 11;
611
- }
612
-
613
- .flyout_arrow_horiz {
614
- position: absolute;
615
- bottom: -1px;
616
- right: 0;
617
- z-index: 10;
618
- }
619
-
620
-
621
- span.zoom_tool {
622
- line-height: 26px;
623
- padding: 3px;
624
- }
625
-
626
- #zoom_panel {
627
- margin-top: 5px;
628
- }
629
-
630
- .dropdown {
631
- position: relative;
632
- }
633
-
634
- .dropdown button {
635
- width: 15px;
636
- height: 21px;
637
- margin: 6px 0 0 1px;
638
- padding: 0;
639
- border-left: 1px solid #FFFFFF;
640
- border-top: 1px solid #FFFFFF;
641
- border-right: 1px solid #808080;
642
- border-bottom: 1px solid #808080;
643
- background-color: #E8E8E8;
644
- }
645
-
646
- .dropdown button.down {
647
- border-left: 1px solid #808080;
648
- border-top: 1px solid #808080;
649
- border-right: 1px solid #FFFFFF;
650
- border-bottom: 1px solid #FFFFFF;
651
- background-color: #B0B0B0;
652
- }
653
-
654
- .dropdown ul {
655
- list-style: none;
656
- position: absolute;
657
- margin: 0;
658
- padding: 0;
659
- left: -85px;
660
- top: 26px;
661
- z-index: 4;
662
- display: none;
663
- }
664
-
665
- .dropup ul {
666
- top: auto;
667
- bottom: 24px;
668
- }
669
-
670
- .dropdown li {
671
- display: block;
672
- width: 120px;
673
- padding: 4px;
674
- background: #E8E8E8;
675
- border: 1px solid #B0B0B0;
676
- margin: 0 0 -1px 0;
677
- line-height: 16px;
678
- }
679
-
680
- .dropdown li:hover {
681
- background-color: #FFC;
682
- }
683
-
684
- .dropdown li.special {
685
- padding: 10px 4px;
686
- }
687
-
688
- .dropdown li.special:hover {
689
- background: #FFC;
690
- }
691
-
692
- #font_family_dropdown-list li {
693
- font-size: 1.4em;
694
- }
695
-
696
- #font_family {
697
- margin-left: 5px;
698
- margin-right: 0;
699
- }
700
-
701
-
702
- .tool_button,
703
- .push_button,
704
- .tool_button_current,
705
- .push_button_pressed
706
- {
707
- height: 24px;
708
- width: 24px;
709
- margin: 2px 2px 4px 2px;
710
- padding: 3px;
711
- -webkit-box-shadow: inset 1px 1px 2px white, 1px 1px 1px rgba(0,0,0,0.3);
712
- moz-box-shadow: inset 1px 1px 2px white, 1px 1px 1px rgba(0,0,0,0.3);
713
- box-shadow: inset 1px 1px 2px white, 1px 1px 1px rgba(0,0,0,0.3);
714
- background-color: #E8E8E8;
715
- cursor: pointer;
716
- border-radius: 3px;
717
- -moz-border-radius: 3px;
718
- -webkit-border-radius: 3px;
719
- }
720
-
721
- #main_menu li#tool_open, #main_menu li#tool_import {
722
- position: relative;
723
- overflow: hidden;
724
- }
725
-
726
- #tool_image {
727
- overflow: hidden;
728
- }
729
-
730
- #tool_open input,
731
- #tool_import input,
732
- #tool_image input {
733
- position: absolute;
734
- opacity: 0;
735
- font-size: 10em;
736
- top: -5px;
737
- right: -5px;
738
- margin: 0;
739
- cursor: pointer; /* Sadly doesn't appear to have an effect */
740
- }
741
-
742
- .disabled {
743
- opacity: 0.5;
744
- cursor: default;
745
- }
746
-
747
- .tool_sep {
748
- width: 1px;
749
- background: #888;
750
- border-left: 1px outset #EEE;
751
- margin: 2px 3px;
752
- padding: 0;
753
- height: 24px;
754
-
755
- }
756
-
757
- .icon_label {
758
- float: left;
759
- padding-top: 3px;
760
- padding-right: 3px;
761
- box-sizing: border-box;
762
- -moz-box-sizing: border-box;
763
- -webkit-box-sizing: border-box;
764
- height: 0;
765
- }
766
-
767
- .width_label {
768
- padding-right: 5px;
769
- }
770
-
771
- #tool_bold, #tool_italic {
772
- font: bold 2.1em/1.1em serif;
773
- text-align: center;
774
- padding-left: 2px;
775
- position: relative;
776
- }
777
-
778
- #text {
779
- position: absolute;
780
- left: -9999px;
781
- }
782
-
783
- #tool_bold span, #tool_italic span {
784
- position: absolute;
785
- width: 100%;
786
- height: 100%;
787
- top: 0; left: 0;
788
- background: #000;
789
- opacity: 0;
790
- }
791
-
792
- #tool_italic {
793
- font-weight: normal;
794
- font-style: italic;
795
- }
796
-
797
- #url_notice {
798
- padding-top: 4px;
799
- display: none;
800
- }
801
-
802
- #color_picker {
803
- position: absolute;
804
- display: none;
805
- background: #E8E8E8;
806
- height: 350px;
807
- z-index: 5;
808
- }
809
-
810
- .tools_flyout {
811
- position: absolute;
812
- display: none;
813
- cursor: pointer;
814
- width: 400px;
815
- z-index: 1;
816
- }
817
-
818
- .tools_flyout_v {
819
- position: absolute;
820
- display: none;
821
- cursor: pointer;
822
- width: 30px;
823
- }
824
-
825
- .tools_flyout .tool_button {
826
- float: left;
827
- background-color: #E8E8E8;
828
- border-left: 1px solid #FFFFFF;
829
- border-top: 1px solid #FFFFFF;
830
- border-right: 1px solid #808080;
831
- border-bottom: 1px solid #808080;
832
- height: 28px;
833
- width: 28px;
834
- }
835
-
836
- #tools_bottom {
837
- position: absolute;
838
- left: 40px;
839
- right: 0;
840
- bottom: 0;
841
- height: 40px;
842
- overflow: visible;
843
- }
844
-
845
- #tools_bottom_1 {
846
- width: 115px;
847
- float: left;
848
- }
849
-
850
- #tools_bottom input[type=text] {
851
- width: 2.2em;
852
- }
853
-
854
- /* Color tools: fill, stroke, opacity
855
- –––––––––––––––––––––––––––––––––––––*/
856
-
857
- #tools_bottom_2 {
858
- float: left;
859
- width: 300px;
860
- position: relative;
861
- margin-top: 5px;
862
- -webkit-transition: width 150ms ease;
863
- }
864
-
865
- .expanded #tools_bottom_2 {
866
- width: 450px;
867
- }
868
-
869
- #tools_bottom #tools_bottom_2 .dropdown button {
870
- margin-top: 2px;
871
- }
872
-
873
- .dropdown li.tool_button {
874
- width: 24px;
875
- }
876
-
877
- #tools_bottom_2 .icon_label {
878
- display: block;
879
- margin: 3px 5px;
880
- padding: 0;
881
- }
882
-
883
- #tool_opacity { right: 0;}
884
- #tool_fill { left: 0; }
885
- #tool_stroke { left: 60px;}
886
-
887
- #fill_color, #stroke_color {
888
- height: 16px;
889
- width: 16px;
890
- border: 1px solid #808080;
891
- cursor: pointer;
892
- overflow: hidden;
893
- }
894
-
895
- #stroke_expand {
896
- width: 0;
897
- overflow: hidden;
898
- }
899
-
900
- #toggle_stroke_tools {
901
- position: absolute;
902
- right: 0;
903
- top: 0;
904
- bottom: 0;
905
- width: 25px;
906
- text-align: center;
907
- border-radius: 0 3px 3px 0;
908
- margin: 0;
909
- }
910
-
911
- #toggle_stroke_tools:before {
912
- content: '>>';
913
- letter-spacing: -3px;
914
- font-weight: bold;
915
- color: #666;
916
- }
917
-
918
- .expanded #tool_stroke.color_tool {
919
- width: 280px;
920
- }
921
-
922
- .expanded #toggle_stroke_tools:before {
923
- content: '<<';
924
- }
925
-
926
- #toggle_stroke_tools:hover {
927
- background: white;
928
- }
929
-
930
- .color_tool {
931
- position: absolute;
932
- overflow: hidden;
933
- background: #f0f0f0;
934
- height: 26px;
935
- line-height: 26px;
936
- border-radius: 3px;
937
- min-width: 52px;
938
- }
939
-
940
- #tool_stroke.color_tool {
941
- width: 130px;
942
- z-index: 2;
943
- -webkit-transition: width 150ms ease;
944
- -moz-transition: width 150ms ease;
945
- -o-transition: width 150ms ease;
946
- -ms-transition: width 150ms ease;
947
- transition: width 150ms ease;
948
- }
949
-
950
-
951
- .color_block {
952
- position: absolute;
953
- top: 0;
954
- left: 0;
955
- }
956
-
957
- .color_block svg {
958
- display: block;
959
- }
960
-
961
- .color_tool > * {
962
- float: left;
963
- margin-right: 5px;
964
- }
965
-
966
- .color_tool .dropdown > * {
967
- float: left;
968
- }
969
-
970
- .color_tool .stroke_label {
971
- margin-left: 25px;
972
- float: left;
973
- }
974
-
975
- .color_tool > .color_block {
976
- top: 3px;
977
- left: 29px;
978
- }
979
-
980
- .color_tool input {
981
- margin: 0;
982
- }
983
-
984
- #tool_opacity {
985
- overflow: visible;
986
- }
987
-
988
- @media screen and (max-width:1250px) {
989
- .expanded #palette_holder {
990
- left: 560px;
991
- overflow-x: scroll;
992
- padding: 0 5px;
993
- margin-top: 2px;
994
- height: 30px;
995
- }
996
- #tools_top {
997
- height: 71px;
998
- }
999
- #workarea, #sidepanels {
1000
- top: 70px;
1001
- }
1002
- #rulers #ruler_corner,
1003
- #rulers #ruler_x, #tools_left {
1004
- top: 71px;
1005
- }
1006
-
1007
- #rulers #ruler_y {
1008
- top: 86px;
1009
- }
1010
-
1011
- #cur_context_panel {
1012
- top: 87px;
1013
- }
1014
-
1015
- #selected_panel {
1016
- clear: right;
1017
- }
1018
-
1019
- }
1020
-
1021
- @media screen and (max-width:1100px) {
1022
- #tools_bottom:not(.expanded) #palette_holder {
1023
- left: 410px;
1024
- overflow-x: scroll;
1025
- padding: 0 5px;
1026
- margin-top: 2px;
1027
- height: 30px;
1028
- }
1029
- }
1030
-
1031
-
1032
- /*–––––––––––––––––––––––––––––––––––––*/
1033
-
1034
- #option_lists ul {
1035
- display: none;
1036
- position: absolute;
1037
- height: auto;
1038
- z-index: 3;
1039
- margin: -10px;
1040
- list-style: none;
1041
- padding-left: 0;
1042
- }
1043
-
1044
- #option_lists .optcols2 {
1045
- width: 70px;
1046
- margin-left: -15px;
1047
- }
1048
-
1049
- #option_lists .optcols3 {
1050
- width: 90px;
1051
- margin-left: -31px;
1052
- }
1053
-
1054
- #option_lists .optcols4 {
1055
- width: 130px;
1056
- margin-left: -44px;
1057
- }
1058
-
1059
- #option_lists ul[class^=optcols] li {
1060
- float: left;
1061
- }
1062
-
1063
- ul li.current {
1064
- background-color: #F4E284;
1065
- }
1066
-
1067
- #option_lists ul li {
1068
- margin: 0;
1069
- border-radius: 0;
1070
- -moz-border-radius: 0;
1071
- -webkit-border-radius: 0;
1072
- }
1073
-
1074
- #tools_bottom .dropdown button {
1075
- margin-top: 2px;
1076
- }
1077
-
1078
- #opacity_dropdown li {
1079
- width: 140px;
1080
- }
1081
-
1082
- #copyright {
1083
- text-align: right;
1084
- padding-right: .3em;
1085
- }
1086
-
1087
- #svg_source_editor {
1088
- display: none;
1089
- }
1090
-
1091
- #svg_source_editor #svg_source_overlay {
1092
- position: absolute;
1093
- top: 0px;
1094
- right: 0px;
1095
- left: 0px;
1096
- bottom: 0px;
1097
- background-color: black;
1098
- opacity: 0.6;
1099
- z-index: 5;
1100
- }
1101
-
1102
- #svg_source_editor #svg_source_container {
1103
- position: absolute;
1104
- top: 30px;
1105
- left: 30px;
1106
- right: 30px;
1107
- bottom: 30px;
1108
- background-color: #B0B0B0;
1109
- opacity: 1.0;
1110
- text-align: center;
1111
- border: 1px outset #777;
1112
- z-index: 6;
1113
- }
1114
-
1115
- #save_output_btns {
1116
- display: none;
1117
- text-align: left;
1118
- }
1119
-
1120
- #save_output_btns p {
1121
- margin: .5em 1.5em;
1122
- display: inline-block;
1123
- }
1124
-
1125
- #bg_blocks {
1126
- overflow: auto;
1127
- margin-left: 30px;
1128
- }
1129
-
1130
- #bg_blocks .color_block {
1131
- position: static;
1132
- }
1133
-
1134
- #svg_docprops #svg_docprops_container,
1135
- #svg_prefs #svg_prefs_container {
1136
- position: absolute;
1137
- top: 50px;
1138
- padding: 10px;
1139
- background-color: #B0B0B0;
1140
- border: 1px outset #777;
1141
- opacity: 1.0;
1142
- /* width: 450px;*/
1143
- font-family: Verdana, Helvetica, sans-serif;
1144
- font-size: .8em;
1145
- z-index: 20001;
1146
- }
1147
-
1148
- #svg_docprops .error {
1149
- border: 1px solid red;
1150
- padding: 3px;
1151
- }
1152
-
1153
- #svg_docprops #resolution {
1154
- max-width: 14em;
1155
- }
1156
-
1157
- #tool_docprops_back,
1158
- #tool_prefs_back {
1159
- margin-left: 1em;
1160
- overflow: auto;
1161
- }
1162
-
1163
- #svg_docprops_container #svg_docprops_docprops,
1164
- #svg_prefs #svg_docprops_prefs {
1165
- float: left;
1166
- width: 221px;
1167
- margin: 5px .7em;
1168
- overflow: hidden;
1169
- }
1170
-
1171
- #svg_prefs_container fieldset + fieldset {
1172
- float: right;
1173
- }
1174
-
1175
- #svg_docprops legend,
1176
- #svg_prefs legend {
1177
- max-width: 195px;
1178
- }
1179
-
1180
- #svg_docprops_docprops > legend,
1181
- #svg_prefs_container > fieldset > legend {
1182
- font-weight: bold;
1183
- font-size: 1.1em;
1184
- }
1185
-
1186
-
1187
- #svg_docprops_container fieldset,
1188
- #svg_prefs fieldset {
1189
- padding: 5px;
1190
- margin: 5px;
1191
- border: 1px solid #DDD;
1192
- }
1193
-
1194
- #svg_docprops_container label,
1195
- #svg_prefs_container label {
1196
- display: block;
1197
- margin: .5em;
1198
- }
1199
-
1200
- #svginfo_bg_note {
1201
- font-size: .9em;
1202
- font-style: italic;
1203
- color: #444;
1204
- }
1205
-
1206
- #canvas_title, #canvas_bg_url {
1207
- display: block;
1208
- width: 96%;
1209
- }
1210
-
1211
- #svg_source_editor #svg_source_textarea {
1212
- position: relative;
1213
- width: 95%;
1214
- top: 5px;
1215
- height: 250px;
1216
- padding: 5px;
1217
- font-size: 12px;
1218
- }
1219
-
1220
- #svg_source_editor #tool_source_back {
1221
- text-align: left;
1222
- padding-left: 20px;
1223
- }
1224
-
1225
- #svg_prefs_container div.color_block {
1226
- float: left;
1227
- margin: 2px;
1228
- padding: 20px;
1229
- }
1230
-
1231
- #change_background div.cur_background {
1232
- border: 2px solid blue;
1233
- padding: 18px;
1234
- }
1235
-
1236
- #background_img {
1237
- position: absolute;
1238
- top: 0;
1239
- left: 0;
1240
- text-align: left;
1241
- }
1242
-
1243
- #svg_docprops button,
1244
- #svg_prefs button {
1245
- margin-top: 0;
1246
- margin-bottom: 5px;
1247
- }
1248
-
1249
- #svg_docprops,
1250
- #svg_prefs {
1251
- display: none;
1252
- }
1253
-
1254
- #image_save_opts label {
1255
- font-size: .9em;
1256
- }
1257
-
1258
- #image_save_opts input {
1259
- margin-left: 0;
1260
- }
1261
-
1262
- #svg_docprops #svg_docprops_overlay,
1263
- #svg_prefs #svg_prefs_overlay {
1264
- position: absolute;
1265
- top: 0px;
1266
- right: 0px;
1267
- left: 0px;
1268
- bottom: 0px;
1269
- background-color: black;
1270
- opacity: 0.6;
1271
- z-index: 20000;
1272
- }
1273
-
1274
- #tool_prefs_option {
1275
- float: right;
1276
- }
1277
-
1278
- .toolbar_button button {
1279
- border:1px solid #dedede;
1280
- line-height:130%;
1281
- float: left;
1282
- background: #E8E8E8 none;
1283
- padding:5px 10px 5px 7px; /* Firefox */
1284
- line-height:17px; /* Safari */
1285
- margin: 5px 20px 0 0;
1286
-
1287
- border: 1px #808080 solid;
1288
- border-top-color: #FFF;
1289
- border-left-color: #FFF;
1290
-
1291
- border-radius: 5px;
1292
- -moz-border-radius: 5px;
1293
- -webkit-border-radius: 5px;
1294
- }
1295
-
1296
- .toolbar_button button:hover {
1297
- border: 1px #e0a874 solid;
1298
- border-top-color: #fcd9ba;
1299
- border-left-color: #fcd9ba;
1300
- background-color: #FFC;
1301
- }
1302
- .toolbar_button button:active {
1303
- background-color: #F4E284;
1304
- border-left: 1px solid #663300;
1305
- border-top: 1px solid #663300;
1306
- }
1307
-
1308
- .toolbar_button button .svg_icon {
1309
- margin:0 3px -3px 0 !important;
1310
- padding:0;
1311
- border:none;
1312
- width:16px;
1313
- height:16px;
1314
- }
1315
-
1316
- #dialog_box {
1317
- display: none;
1318
- }
1319
-
1320
- #dialog_box_overlay {
1321
- background: black;
1322
- opacity: .5;
1323
- height:100%;
1324
- left:0;
1325
- position:absolute;
1326
- top:0;
1327
- width:100%;
1328
- z-index: 6;
1329
- }
1330
-
1331
- #dialog_content {
1332
- height: 95px;
1333
- margin: 10px 10px 5px 10px;
1334
- background: #DDD;
1335
- overflow: auto;
1336
- text-align: left;
1337
- border: 1px solid #B0B0B0;
1338
- }
1339
-
1340
- #dialog_content.prompt {
1341
- height: 75px;
1342
- }
1343
-
1344
- #dialog_content p {
1345
- margin: 10px;
1346
- line-height: 1.3em;
1347
- }
1348
-
1349
- #dialog_container {
1350
- position: absolute;
1351
- font-family: Verdana;
1352
- text-align: center;
1353
- left: 50%;
1354
- top: 50%;
1355
- width: 300px;
1356
- margin-left: -150px;
1357
- height: 150px;
1358
- margin-top: -80px;
1359
- position:fixed;
1360
- z-index:50001;
1361
- background: #CCC;
1362
- border: 1px outset #777;
1363
- font-family:Verdana,Helvetica,sans-serif;
1364
- font-size:0.8em;
1365
- }
1366
-
1367
- #dialog_container, #dialog_content {
1368
- border-radius: 5px;
1369
- -moz-border-radius: 5px;
1370
- -webkit-border-radius: 5px;
1371
- }
1372
-
1373
- #dialog_buttons input[type=text] {
1374
- width: 90%;
1375
- display: block;
1376
- margin: 0 0 5px 11px;
1377
- }
1378
-
1379
- #dialog_buttons input[type=button] {
1380
- margin: 0 1em;
1381
- }
1382
-
1383
-
1384
- /* Slider
1385
- ----------------------------------*/
1386
- .ui-slider { position: relative; text-align: left; }
1387
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
1388
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
1389
-
1390
- .ui-slider-horizontal { height: .8em; }
1391
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
1392
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
1393
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
1394
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
1395
-
1396
- .ui-slider-vertical { width: .8em; height: 100px; }
1397
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
1398
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
1399
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
1400
- .ui-slider-vertical .ui-slider-range-max { top: 0; }
1401
-
1402
- .ui-slider {
1403
- border: 1px solid #B0B0B0;
1404
- }
1405
-
1406
- .ui-slider-handle {
1407
- background: #B0B0B0;
1408
- border: 1px solid #000;
1409
- }
1410
-
1411
- /* Necessary to keep the flyouts sized properly */
1412
- .tools_flyout .tool_button,
1413
- .tools_flyout .tool_flyout {
1414
- padding: 2px;
1415
- width: 24px;
1416
- height: 24px;
1417
- margin: 0;
1418
- border-radius: 0px;
1419
- -moz-border-radius: 0px;
1420
- -webkit-border-radius: 0px;
1421
- }
1422
-
1423
- /* Generic context menu styles */
1424
- .contextMenu {
1425
- position: absolute;
1426
- z-index: 99999;
1427
- border: solid 1px rgba(0,0,0,.33);
1428
- background: rgba(255,255,255,.95);
1429
- padding: 5px 0;
1430
- margin: 0px;
1431
- display: none;
1432
- font: 12px/15px Lucida Sans, Helvetica, Verdana, sans-serif;
1433
- border-radius: 5px;
1434
- -moz-border-radius: 5px;
1435
- -moz-box-shadow: 2px 5px 10px rgba(0,0,0,.3);
1436
- -webkit-box-shadow: 2px 5px 10px rgba(0,0,0,.3);
1437
- box-shadow: 2px 5px 10px rgba(0,0,0,.3);
1438
- }
1439
-
1440
- .contextMenu LI {
1441
- list-style: none;
1442
- padding: 0px;
1443
- margin: 0px;
1444
- }
1445
-
1446
- .contextMenu .shortcut {
1447
- width: 115px;
1448
- text-align:right;
1449
- float:right;
1450
- }
1451
-
1452
- .contextMenu A {
1453
- -moz-user-select: none;
1454
- -webkit-user-select: none;
1455
- color: #222;
1456
- text-decoration: none;
1457
- display: block;
1458
- line-height: 20px;
1459
- height: 20px;
1460
- background-position: 6px center;
1461
- background-repeat: no-repeat;
1462
- outline: none;
1463
- padding: 0px 15px 1px 20px;
1464
- }
1465
-
1466
- .contextMenu LI.hover A {
1467
- background-color: #2e5dea;
1468
- color: white;
1469
- cursor: default;
1470
- }
1471
-
1472
- .contextMenu LI.disabled A {
1473
- color: #999;
1474
- }
1475
-
1476
- .contextMenu LI.hover.disabled A {
1477
- background-color: transparent;
1478
- }
1479
-
1480
- .contextMenu LI.separator {
1481
- border-top: solid 1px #E3E3E3;
1482
- padding-top: 5px;
1483
- margin-top: 5px;
1484
- }
1485
-
1486
- /*
1487
- Adding Icons
1488
-
1489
- You can add icons to the context menu by adding
1490
- classes to the respective LI element(s)
1491
- */
1492
- /*
1493
-
1494
- .contextMenu LI.edit A { background-image: url(images/page_white_edit.png); }
1495
- .contextMenu LI.cut A { background-image: url(images/cut.png); }
1496
- .contextMenu LI.copy A { background-image: url(images/page_white_copy.png); }
1497
- .contextMenu LI.paste A { background-image: url(images/page_white_paste.png); }
1498
- .contextMenu LI.delete A { background-image: url(images/page_white_delete.png); }
1499
- .contextMenu LI.quit A { background-image: url(images/door.png); }
1500
- */