-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathj.html
executable file
·790 lines (766 loc) · 32.2 KB
/
j.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" >
<link rel="stylesheet" href="j.css" >
<script src="j.js" ></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" ></script>
<!-- <script src="https://code.jquery.com/jquery-3.2.1.min.js" ></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" ></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" ></script>
<script src= "https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js"> </script>
<script type="text/javascript">
let open_files = {};
let font_size = {};
let lines = [];
let views = {};
let l_out = {}
let lkup = {}
let vars = {}
let curr_vars = {}
let curr_layout_name = '1x1';
let drawings = {};
views['Basic'] = {};
let lines_by_color = [];
let grahas_in_rashi = {};
let grList_by_dNum_raNum = {};
let divisional_data = {};
let gochar_data = {};
let c_gchar = {};
let degree_of_grahas = {};
let retro_planet_list = [];
let curr_drawing_idList = [];
let rashiNum_asc = "1";
let rashiNum_h1 = "";
let year_days = 365.256363;
// $(function(){
// $("#settings_panel").load("settings.html");
// });
</script>
</head>
<body>
<div id='header' class="row w-100 ml-1">
<div class="col-4 m-0 p-0">
<h2>JGD Kundli</h2>
<p>Jai gurudev v3.6<small><i> 15Oct2024</i></small></p>
</div>
<div class="col-8 m-0 p-0">
<!-- TOP MENU ICONs on the top -->
<img id='h_dnld' src="images/download_b.png" alt="Download" title="Download Current"
onclick="saveData();" height='54' class='mx-1' />
<img id='h_open' src="images/open.png" alt="Open Saved File" title="Open Saved File"
onclick="openFile();" height='54' class='mx-1'/>
<img id='h_ret2NotesImg' onclick='disp_notes();' src='images/list.jpg'
title="Display Notes" alt="DisplayNotes" height='54' class='mx-1'/>
<img id='h_disp_settings' src="images/settings_2.jpg" title="Display Settings"
alt="dispSettings" onclick="disp_settings();" height='54' class='mx-1'/>
</div>
</div>
<!-- <div id="modal3B" style="z-index:5;" class="modal" > -->
<div id="modal3B" style="z-index:3;" class="modal d-none" >
<div class="col-3 modal-content float-right">
<span class="close"
onclick = "{document.getElementById('modal3B').style.display = 'none';}"
>×
</span>
<p id="modal3M">Panduranga Naamamu Parama Punya Dhaaamamu..</p>
</div>
</div>
<div id="modal2B" style="z-index:5;display:none; " class="modal" >
<div class="col-3 modal-content float-top float-right">
<span class="close"
onclick = "{document.getElementById('modal2B').style.display = 'none';}"
>×
</span>
<p id="modal2M">Panduranga Naamamu Parama Punya Dhaaamamu..</p>
</div>
</div>
<div id="modalB" style="display:none;" class="modal" >
<div class="col-6 float-top float-right modal-content">
<span class="close"
onclick = "{document.getElementById('modalB').style.display = 'none';}"
>×
</span>
<p id="modalM">Panduranga Naamamu Parama Punya Dhaaamamu..</p>
</div>
</div>
<div class="row w-100 text-black ml-1" style="background-color:#ffffe9;">
<div class="mx-1 text-center" id="first_col">
<hr>
<div class="m-0 p-0 border border-5 border-info">
Draw<br>
<img id='clearCanvas' src="images/reset_a.jpg" alt="ClearDrawing"
onclick="{
ctx.clearRect(0, 0, canvas.width, canvas.height);
document.getElementById('canvas').style.zIndex = '1';
lines = [];
lines_by_color =[];
}" title='ClearDrawing' height='21'
/>
<br>
<span id='strokeColor' class='d-none'>green</span>
<span id='blue'
onclick="document.getElementById('strokeColor').innerHTML = 'blue';"
class='btn btn-primary my-0 py-0 mx-0 px-0 small'> BL </span><br>
<span id='green'
onclick="document.getElementById('strokeColor').innerHTML = 'green';"
class='btn btn-success my-0 py-0 mx-0 px-0 small'> GR </span><br>
<span id='red'
onclick="document.getElementById('strokeColor').innerHTML = 'red';"
class='btn btn-danger my-0 py-0 mx-0 px-0 small'> RE </span><br>
<span id='magenta'
onclick="document.getElementById('strokeColor').innerHTML = 'magenta';"
style="background-color:magenta;"
class='btn my-0 py-0 mx-0 px-0 small'> PN </span><br>
<img id='undo' src="images/back.png" class='my-0 py-0 mx-0 px-0' title='Undo Stroke'
alt="Undo Stroke" onclick="undo_stroke();" height='21' /> <br>
<img id='SaveDrawing' src="images/save_drawing.png" title='Take Snapshot of Drawing'
alt="saveDrawing" onclick="save_drawing();" height='21' />
</div>
<!-- -->
<!-- -->
<div class='my-0 text-center'>
<br><hr class='my-0 py-0'>
<img id='plus_font' src="images/plus_c.png" alt="RashiNumIncrFontSize"
onclick="incr_font_size('rashinum',10);" height='21' title='Incr Rashi Num FontSize'
/><br>R<br><img id='minus_font' src="images/minus_c.png" alt="RashiNumDescrontSize"
onclick="incr_font_size('rashinum',-10);" height='21' title='Decr Rashi Num FontSize'
/>
<br><hr class='my-1 py-0'>
<img id='plus_fontr' src="images/plus_c.png" alt="GrahaIncrFontSize"
onclick="incr_font_size('house',10);" height='21' title='Incr Graha FontSize'
/><br>P<br><img id='minus_fontr' src="images/minus_c.png" alt="GrahaDescrontSize"
onclick="incr_font_size('house',-10);" height='21' title='Decr Graha FontSize'
/>
<br><hr class='my-1 py-0'>
<img id='plus_fontg' src="images/plus_c.png" alt="GGrahaIncrFontSize"
onclick="incr_font_size('gchar',10);" height='21' title='Incr GGraha FontSize'
/><br>G<br><img id='minus_fontg' src="images/minus_c.png" alt="GGrahaDescrontSize"
onclick="incr_font_size('gchar',-10);" height='21' title='Decr GGraha FontSize'
/>
<br><hr class='my-1 py-0'>
<img id='show_rotate_links' src="images/rotate.png" alt="ShowRotateHouseLinks"
onclick="disp_rotate_links('show');" height='21' title='Toggle show/hide House Rotate Links'/>
<img id='hide_rotate_links' class='d-none' src="images/rotate.png" alt="HideRotateHouseLinks"
onclick="disp_rotate_links('hide');" height='21' title='Toggle show/hide House Rotate Links'/>
<br><hr class='my-1 py-0'>
<img id='show_degree' src="images/degree.png" alt="ShowDegree" class='d-none'
onclick="disp_degree('show');" height='21' title='Toggle show/hide Degree'/>
<img id='hide_degree' src="images/degree.png" alt="HideDegree"
onclick="disp_degree('hide');" height='21' title='Toggle show/hide Degree'/>
</div>
</div>
<div class="col-sm m-0 p-0">
<div class="row w-100 m-0 p-0 bg-white border border-5 border-info">
<!-- DIV for list of tabs for openeed charts -->
<div class="col-12 m-0 p-0" id='j_opened'></div>
</div>
<div id ='main_disp' class="row w-100 m-0 p-0">
<div id ='printme' class="row w-100 m-0 p-0">
<div id='drawme' class="col-8 m-0 p-0">
<img id='empty_image' src="images/empty.png" alt="Snow"
style="width:100%;position:absolute;z-index:1;">
<canvas crossOrigin='anonymous' id="canvas" style='position:relative;z-index:1;'></canvas>
<!-- <div class=" p-1 m-1 chart_title h4 bg-warning text-danger font-weight-bold" -->
<!-- onclick="{ -->
<!-- document.getElementById('modal2B').style.display = 'block'; -->
<!-- document.getElementById('modal2M').innerHTML = choose_view_generate_form(); -->
<!-- }" -->
<!-- style="z-index:3;font-size: 150%; " -->
<!-- id='chart_title'>D1</div> -->
<!-- List of divs for RASHINUM class rbN rb1 to rb12 -->
<!-- <div class="rb1 h5 rashinum font-weight-bold text-black" -->
<!-- style="z-index:2;font-size: 120%; " -->
<!-- id='rashi_in_h1'>1</div> -->
<!-- -->
<!-- -->
<!-- <div class="house b1" style="z-index:2;" id='h1'><br><b>ASC</b> </div> -->
<!-- List of divs for ROTATE buttons class rotbN rotb1 to rotb12 -->
<!-- <span onclick=rotate_by_house(2); style="z-index:2;" id='make_ascndnt_h2' -->
<!-- title='rotate_make_this_H1' class='rot small rotb2'>m</span> -->
<!-- -->
<!-- -->
<!-- List of divs for GocharGrahs buttons class gbN gb1 to gb12 -->
<!-- <div class="gb1 ggraha" -->
<!-- style="font-size: 90%;z-index:2;" id='gh1'> </div> -->
<!-- <div class="bottom-left">Bottom Left</div> -->
<!-- <div class="top-left">Top Left</div> -->
<!-- <div class="top-right">Top Right</div> -->
<!-- <div class="bottom-right">Bottom Right</div> -->
<!-- <div class="centered">Centered</div> -->
</div>
<div id="settings_panel" class="col-6 d-none m-0 p-0 text-primary">
<!-- -->
<!-- <span onclick='disp_settings_resize();' class='text-danger h5 font-weight-bold'>Resize</span><br> -->
<span class='text-info h5 font-weight-bold'>Basic Details</span>
<span id='load_from_dpanchang' class='mx-1 p-0 btn btn-primary'>Load-from-DrikPanchang</span>
<span
onclick="{ document.getElementById('modalB').style.display = 'block';
document.getElementById('modalM').innerHTML =
'<span class=\'h5 text-danger font-weight-bold\'>';
document.getElementById('modalM').innerHTML +=
'Input ClipBoard from Jagannath Hora</span><br>';
document.getElementById('modalM').innerHTML +=
'<textarea class=\'small mx-2 text-primary col-12\' id=\'free_form_settings\' +\
name=\'free_form_settings\' rows=\'18\'>rama</textarea>';
document.getElementById('modalM').innerHTML +=
'<span onclick=\'process_jh_freeForm_settings();\' +\
class=\'btn btn-primary m-0 p-0\'>Import</span>';
}"
class='mx-1 p-0 btn btn-info float-right'>JHora-FreeFormText</span>
<br>
<span class='text-primary h5'>DOB</span>
<input onchange='save_vars();' type='date' id='dob'/>
<span class='text-primary h5'>GID</span>
<input onchange='save_vars();' type='text' style="width:108px" id='gid' placeholder='GeoNameID'/>
<span class='text-primary h5'>TOB</span>
<input onchange='save_vars();' type='text' style="width:90px" id='tob' placeholder='HH:MM:SS'/>
<span class='small text-secondary h6'>24Hr</span><br>
<span class='text-primary h5'>POB</span>
<input onchange='save_vars();' type='text' style="width:306px"
id='pob' placeholder='Place Of Birth'/>
<hr>
<span class='text-info h4'>D1-Chart:</span><br>
<span class='text-primary h5'>Lagna</span>
<select onchange = "change_ascendant(document.getElementById('lagna').value);"
name="lagna" id="lagna">
<option value="XX">XX</option>
<option value="1">1:Mesha/Aires</option>
<option value="2">2:Vrishabha/Tauraus</option>
<option value="3">3:Mithuna/Gemini</option>
<option value="4">4:Karka/Cancer</option>
<option value="5">5:Simha/Leo</option>
<option value="6">6:Kanya/Virgo</option>
<option value="7">7:Tula/Libra</option>
<option value="8">8:Vrischika/Scorpio</option>
<option value="9">9:Dhanu/Saggitarius</option>
<option value="10">10:Makara/Capricorn</option>
<option value="11">11:Kumbha/Aquarius</option>
<option value="12">12:Meen/Pisces</option>
</select>
<br>
<div class="row w-100">
<div class="col-8">
<input id='la_deg' type="text" style="width:54px"
placeholder='Deg' onchange="save_degree('La');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='la_min' type="text" style="width:54px"
placeholder='Min' onchange="save_degree('La');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='la_sec' type="text" style="width:54px"
placeholder='Sec' onchange="save_degree('La');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
</div>
<br>
<!-- SU SUN -->
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-danger d-none'
style="font-size: 180%;" id='Su'><br>Su</span>
<span class='text-danger h5'>Su</span>
</div>
<div class="col-8">
<select onchange = "{
var su_h = document.getElementById('h_su').value;
place_graha_in_house('Su',su_h);
$('#Su').detach().prependTo('#'+su_h);
$('#Su').removeClass('d-none');}"
name="h_su" id="h_su">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='su_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Su');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='su_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Su');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='su_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Su');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
</div>
<!-- MO MOON -->
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-success d-none'
style="font-size: 180%;" id='Mo'><br>Mo</span>
<span class='text-success h5'>Mo</span>
</div>
<div class="col-8">
<select onchange = "{
var mo_h = document.getElementById('h_mo').value;
place_graha_in_house('Mo',mo_h);
$('#Mo').detach().prependTo('#'+mo_h);
$('#Mo').removeClass('d-none');}"
name="h_mo" id="h_mo">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='mo_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Mo');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='mo_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Mo');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='mo_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Mo');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
</div>
<br>
<!-- JU JUPITER -->
<div class="row w-100">
<div class="col-1">
<span class='h3 graha graha font-weight-bold text-success d-none'
style="font-size: 180%;" id='Ju'><br>Ju
</span>
<span class='text-success h5'>Ju</span>
</div>
<div class="col-8">
<select onchange = "{
var j_h = document.getElementById('h_ju').value;
place_graha_in_house('Ju',j_h);
$('#Ju').detach().prependTo('#'+j_h);
$('#Ju').removeClass('d-none');}"
name="h_ju" id="h_ju">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='ju_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Ju');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ju_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Ju');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ju_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Ju');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
<div class="col-2">
R<input type=checkbox onclick="retro_flag('Ju');" id="Ju_retrocbox" name="Ju_retrocbox">
</div>
</div>
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-danger d-none'
style="font-size: 180%;" id='Sa'><br>Sa
</span>
<!-- <span onclick ="{ -->
<!-- const ctx = document.getElementById('myCanvas').getContext('2d'); -->
<!-- ctx.beginPath(); -->
<!-- ctx.moveTo(0, 0); -->
<!-- ctx.lineTo(300, 150); -->
<!-- }" -->
<!-- class='small font-weight-bold'>D</span> -->
<span class='text-danger h5'>Sa</span>
</div>
<div class="col-8">
<select onchange = "{
var sa_h = document.getElementById('h_sa').value;
place_graha_in_house('Sa',sa_h);
$('#Sa').detach().prependTo('#'+sa_h);
$('#Sa').removeClass('d-none');}"
name="h_sa" id="h_sa">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='sa_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Sa');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='sa_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Sa');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='sa_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Sa');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
<div class="col-2">
R<input type=checkbox onclick="retro_flag('Sa');" id="Sa_retrocbox" name="Sa_retrocbox">
</div>
</div>
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-success d-none'
style="font-size: 180%;" id='Me'><br>Me
</span>
<span class='text-success h5'>Me</span>
</div>
<div class="col-8">
<select onchange = "{
var me_h = document.getElementById('h_me').value;
place_graha_in_house('Me',me_h);
$('#Me').detach().prependTo('#'+me_h);
$('#Me').removeClass('d-none');}"
name="h_me" id="h_me">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='me_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Me');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='me_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Me');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='me_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Me');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
<div class="col-2">
R<input type=checkbox onclick="retro_flag('Me');" id="Me_retrocbox" name="Me_retrocbox">
</div>
</div>
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-success d-none'
style="font-size: 180%;" id='Ve'><br>Ve
</span>
<span class='text-success h5'>Ve</span>
</div>
<div class="col-8">
<select onchange = "{
var ve_h = document.getElementById('h_ve').value;
place_graha_in_house('Ve',ve_h);
$('#Ve').detach().prependTo('#'+ve_h);
$('#Ve').removeClass('d-none');}"
name="h_ve" id="h_ve">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='ve_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Ve');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ve_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Ve');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ve_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Ve');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
<div class="col-2">
R<input type=checkbox onclick="retro_flag('Ve');" id="Ve_retrocbox" name="Ve_retrocbox">
</div>
</div>
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-danger d-none'
style="font-size: 180%;" id='Ma'><br>Ma
</span>
<span class='text-danger h5'>Ma</span>
</div>
<div class="col-8">
<select onchange = "{
var ma_h = document.getElementById('h_ma').value;
place_graha_in_house('Ma',ma_h);
$('#Ma').detach().prependTo('#'+ma_h);
$('#Ma').removeClass('d-none');}"
name="h_ma" id="h_ma">
<option value="XX">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='ma_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Ma');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ma_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Ma');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ma_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Ma');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
<div class="col-2">
R<input type=checkbox onclick="retro_flag('Ma');" id="Ma_retrocbox" name="Ma_retrocbox">
</div>
</div>
<br>
<div class="row w-100">
<div class="col-1">
<span class='h3 graha font-weight-bold text-danger d-none'
style="font-size: 180%;" id='Ra'><br>Ra</span>
<span class='h3 graha font-weight-bold text-danger d-none'
style="font-size: 180%;" id='Ke'><br>Ke</span>
<span class='text-danger h5'>Ra</span>
</div>
<div class="col-8">
<select onchange = "{
var ra_h = document.getElementById('h_ra').value;
place_graha_in_house('Ra',ra_h);
var ke_val = (parseInt(ra_h.substring(1))+6)%12
if (ke_val==0) { ke_val=12; }
var ke_h = 'h' + ke_val.toString();
place_graha_in_house('Ke',ke_h);
$('#Ra').detach().prependTo('#'+ra_h);
$('#Ra').removeClass('d-none');
$('#Ke').detach().prependTo('#'+ke_h);
$('#Ke').removeClass('d-none');
}"
name="h_ra" id="h_ra">
<option value="h0">XX</option>
<option value="h1">H1</option>
<option value="h2">H2</option>
<option value="h3">H3</option>
<option value="h4">H4</option>
<option value="h5">H5</option>
<option value="h6">H6</option>
<option value="h7">H7</option>
<option value="h8">H8</option>
<option value="h9">H9</option>
<option value="h10">H10</option>
<option value="h11">H11</option>
<option value="h12">H12</option>
</select>
<input id='ra_deg' type="text" style="width:54px" placeholder='Deg' onchange="save_degree('Ra');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ra_min' type="text" style="width:54px" placeholder='Min' onchange="save_degree('Ra');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
<input id='ra_sec' type="text" style="width:54px" placeholder='Sec' onchange="save_degree('Ra');"
class='py-0 my-0 text-primary font-weight-bold h6'/>
</div>
</div>
<!-- <hr> -->
<span class='text-info font-weight-bold'>Open Saved:</span>
<input type="file" name="file-input" id="file-input" multiple>
<!-- <br><pre id="file-content"></pre> -->
<!-- <span class='text-info font-weight-bold'>Gochar:</span> -->
<!-- <input type="file" name="gochar-input" id="gochar-input"> -->
</div>
<div id="notes_panel" class="col-4 m-0 p-0 text-primary">
<!--
<img id='disp_settings2' src="images/settings_2.jpg"
title="Display Settings" alt="dispSettings" class='mr-1'
onclick="disp_settings();" height='18'/>
-->
File: <input id='j_filename' type="text" class='w-30 text-warning bg-secondary font-weight-bold h6'/>
<br><span class='border border-5 border-danger my-2 mx-1 py-1'> View:
<!-- <select id='j_view' onchange = "change_view(document.getElementById('j_view').value);" -->
<select id='j_view' onfocus = "save_view(this.value)" onchange = "change_view(this);"
></select>
<script>
views['Basic'] ={};
var select = document.getElementById('j_view');
for (v in views) {
select.options[select.options.length] = new Option(v,v);
}
</script>
<!-- <input id='j_view' type="text" class='w-25 text-warning bg-secondary font-weight-bold h6'/> -->
<img id='save_view' src="images/save.png" alt="SaveView" class='ml-2'
onclick="save_view();" height='18'/>
<img id='add_view_form' src="images/plus_c.png" alt="AddView" class='mx-2'
onclick="add_view_form();" height='18'/>
</span>
<!-- <img id='disp_settings' src="images/settings_2.jpg" alt="dispSettings" class='mx-2' -->
<!-- onclick="disp_settings();" height='18'/> -->
<hr class='m-0 p-0 border-info'>
<span id ='title' class='m-0 p-0'>Basic-Title:</span>
<input id='j_title' type="text" class='w-100 text-primary font-weight-bold h6'/>
<span id ='notes' class='m-1 p-0 note_obs bg-warning'
onclick='highlightJustme("note_obs","notes");displayJustme("tarea_note_obs","j_notes");'
>Basic-Notes:</span>
<span id ='drawings'
onclick='highlightJustme("note_obs","drawings");displayJustme("tarea_note_obs","j_obs");'
class='m-0 p-0 note_obs'>Basic-Observations:</span> <br>
<textarea class='tarea_note_obs w-100 text-primary h6 ' rows='6' id='j_notes'></textarea>
<span class='tarea_note_obs d-none' id='j_obs'>
<span id ='j_drawings' class='m-0 p-0 w-90 text-wrap'></span>
<br>
<span id ='comments' class='m-0 p-0'>Comments:</span>
<span id ='j_comm_title' class='text-success font-weight-bold m-0 p-0'></span>
<br>
<textarea class='w-100 text-success h6 font-weight-bold' rows='6' id='j_comments'></textarea>
</span>
<br>
<div id='dasha_gochar_panel' class='bg-light' style="height: 108x; overflow: auto"></div>
</div>
</div>
</div>
<div class="row w-100 m-0 p-0 bg-white border border-5 border-info">
<div class="col-12 m-0 p-0 " id="j_view_formats">
<!-- <button id='chart_d1' onclick="chart_d1();" -->
<!-- class="font-weight-bold bg-warning btn-link border border-primary py-0 px-2 mx-0">D1</button> -->
<button id='view_1x1' onclick="view_1x1();"
class="font-weight-bold text-warning btn-link border border-primary py-0 px-2 mx-0">1x1</button>
<button id='view_1x2' onclick="view_1x2();"
class="font-weight-bold text-warning btn-link border border-primary py-0 px-2 mx-0">1x2</button>
<button id='view_2x2' onclick="view_2x2();"
class="font-weight-bold text-warning btn-link border border-primary py-0 px-2 mx-0">2x2</button>
</div>
</div>
</div>
</div>
<hr>
<div id="output"></div>
<script type="text/javascript">
const o_data = {};
const el = document.getElementById('file-input');
// if (el) { el.addEventListener('change', readSingleFile, false);}
if (el) { el.addEventListener('change', readMultipleFiles, false); }
const elg = document.getElementById('gochar-input');
if (elg) { elg.addEventListener('change', readGocharFile, false); }
window.addEventListener('load', ()=>{
resize(); // Resizes the canvas once the window loads
document.addEventListener('mousedown', startPainting);
document.addEventListener('mouseup', stopPainting);
document.addEventListener('mousemove', sketch);
window.addEventListener('resize', resize);
$("#drawme").resize(function(){ disp_layout(); });
initialize_l_out();
view_1x1();
});
//
const canvas = document.querySelector('#canvas');
// Context for the canvas for 2 dimensional operations
const ctx = canvas.getContext('2d');
// Resizes the canvas to the available size of the window.
function resize(){
// ctx.canvas.width = window.innerWidth;
// ctx.canvas.height = window.innerHeight;
// ctx.canvas.width = document.getElementById('printme').innerWidth;
// ctx.canvas.height = document.getElementById('printme').innerHeight;
ctx.canvas.width = document.getElementById('empty_image').offsetWidth;
ctx.canvas.height = document.getElementById('empty_image').offsetHeight;
// ctx.canvas.offsetLeft = document.getElementById('first_col').offsetWidth;
// alert(document.getElementById('first_col').offsetWidth);
}
// Stores the initial position of the cursor
let coord = {x:0 , y:0};
// This is the flag that we are going to use to
// trigger drawing
let paint = false;
// 2D Array. First dimension is the line number. Second dimension stores that line's x,y coordinates.
// let lines = [];
// let lines_by_color = [];
// let grahas_in_rashi = {};
// let rashiNum_asc = "1";
// let rashiNum_h1 = "";
for (let i=1; i<=12; i++) { grahas_in_rashi[i.toString()] = []; }
// Updates the coordianates of the cursor when
// an event e is triggered to the coordinates where
// the said event is triggered.
function getPosition(event){
// coord.x = event.clientX - canvas.offsetLeft;
// coord.y = event.clientY - canvas.offsetTop;
// coord.x = event.clientX;
// coord.y = event.clientY;
// alert(coord.x);
coord.x = event.clientX - document.getElementById('first_col').offsetWidth;
coord.y = event.clientY - document.getElementById('header').offsetHeight - document.getElementById('j_opened').offsetHeight-document.getElementById('j_view_formats').offsetHeight;
}
// The following functions toggle the flag to start
// and stop drawing
function startPainting(event){
paint = true;
getPosition(event);
lines.push([]);
var strokeColor = document.getElementById('strokeColor').innerHTML;
lines_by_color.push(
{
'color':strokeColor,
'canvas_dims':[canvas.height, canvas.width],
'coords':[]
}
);
}
function stopPainting(){
paint = false;
}
var count = 0
function sketch(event){
if (!paint) return;
ctx.beginPath();
count += 1
ctx.lineWidth = 5;
// Sets the end of the lines drawn
// to a round shape.
ctx.lineCap = 'round';
var strokeColor = document.getElementById('strokeColor').innerHTML;
ctx.strokeStyle = strokeColor;
// The cursor to start drawing
// moves to this coordinate
ctx.moveTo(coord.x, coord.y);
// The position of the cursor
// gets updated as we move the
// mouse around.
getPosition(event);
// A line is traced from start
// coordinate to this coordinate
if (coord.x>0) {
ctx.lineTo(coord.x , coord.y);
// Draws the line.
ctx.stroke();
}
lines[lines.length-1].push([coord.x, coord.y])
lines_by_color[lines_by_color.length-1]['coords'].push([coord.x, coord.y])
}
</script>
</body>
</html>
<!--
<body>
<div class="container" style="position:relative;text-align: center; color: red;">
<img src="empty.png" alt="Snow" style="width:100%;">
<div class="bottom-left">Bottom Left</div>
<div class="top-left">Top Left</div>
<div class="top-right">Top Right</div>
<div class="bottom-right">Bottom Right</div>
<div class="centered">Centered</div>
</div>
</body>
</html>
-->