Commit bde7b0b1d8ff1cbe33f60dee2347d04ecb6973f0
- Diff rendering mode:
- inline
- side by side
jit.js
(11 / 10)
  | |||
6737 | 6737 | }; | |
6738 | 6738 | for(var z=0.31;z<=1;z+=0.01){ | |
6739 | 6739 | var y=(1-Math.pow(z,C))/(1-z); | |
6740 | if(y>=2){ //Ajay - y>=2 | ||
6741 | return B(z-0.01) // Ajay - 0.01 | ||
6740 | if(y>=2){ //Ajay - Curve of an edge, increase in value = more curve. | ||
6741 | return B(z-0.02) // Ajay - Default(0.0)!! // Ajay - make it clickable upto the depth of tree, STEP BY STEP. | ||
6742 | //Increase in value = deeper the length. | ||
6742 | 6743 | } | |
6743 | 6744 | } | |
6744 | 6745 | return B(0.75) | |
… | … | ||
6780 | 6780 | }, | |
6781 | 6781 | onClick:function(y,w){ | |
6782 | 6782 | // Ajay - Visual target selection | |
6783 | if (this.graph.getNode(y)._angularWidth == 0.5) { | ||
6784 | if (this.graph.getNode(y).data.band == "Location") { | ||
6785 | $("#loc-select").html(this.graph.getNode(y).name); | ||
6786 | } else if (this.graph.getNode(y).data.band == "Languages") { | ||
6787 | $("#lang-select").html(this.graph.getNode(y).name); | ||
6788 | } else if (this.graph.getNode(y).data.band == "Style") { | ||
6789 | $("#style-select").html(this.graph.getNode(y).name); | ||
6783 | if (this.graph.getNode(y)._angularWidth <= 0.5) { | ||
6784 | if (this.graph.getNode(y).data.band == "Character") { | ||
6785 | $("#character-value").html(this.graph.getNode(y).name); | ||
6786 | } else if (this.graph.getNode(y).data.band == "Jewellery") { | ||
6787 | $("#jewellery-value").html(this.graph.getNode(y).name); | ||
6788 | } else if (this.graph.getNode(y).data.band == "Material") { | ||
6789 | $("#material-value").html(this.graph.getNode(y).name); | ||
6790 | 6790 | } | |
6791 | 6791 | } | |
6792 | 6792 | // Ajay - end of visual target selection | |
… | … | ||
6795 | 6795 | }, | |
6796 | 6796 | move:function(A,y){ | |
6797 | 6797 | var x=r(A.x,A.y); | |
6798 | if(this.busy===false&&x.norm()<0.7){ // Ajay - 1 | ||
6798 | if(this.busy===false&&x.norm()<0.9){ // Ajay - make it clickable upto the depth of tree DIRECTLY. Increase in value = deeper the length. | ||
6799 | 6799 | this.busy=true; | |
6800 | 6800 | var w=this.graph.getClosestNodeToPos(x), | |
6801 | 6801 | z=this;this.graph.computeLevels(w.id,0); |
openlayers.html
(10 / 2)
  | |||
36 | 36 | <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script> | |
37 | 37 | <script type="text/javascript" src="myVector.js"></script> | |
38 | 38 | </head> | |
39 | <body onload="init(); inits();" onclick="annotationTree()"> | ||
39 | <body onload="init();" onclick="annotationTree()"> | ||
40 | 40 | <div id="header"><h1>Lepakshi Mural</h1></div> | |
41 | 41 | <div id="subheader">Generated by <a href="http://www.maptiler.org/">MapTiler</a><a href="http://www.klokan.cz/projects/gdal2tiles/">GDAL2Tiles</a>, Copyright © 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> & <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a> | |
42 | 42 | <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU --> | |
… | … | ||
62 | 62 | </ul> | |
63 | 63 | </div> | |
64 | 64 | <script type="text/javascript" >resize()</script> | |
65 | <div id="annotation-tree"><div id="infovis"></div></div> | ||
65 | <div id="annotation-tree"><div id="infovis"> | ||
66 | <form> | ||
67 | <div>Charater: <span id="character-value"></span></div> | ||
68 | <div>Ornament </div> | ||
69 | <div>Material: <span id="material-value"></span></div> | ||
70 | <div>Jewellery: <span id="jewellery-value"></span></div> | ||
71 | </form> | ||
72 | </div> | ||
73 | </div> | ||
66 | 74 | </body> | |
67 | 75 | </html> |
tree.js
(161 / 145)
  | |||
18 | 18 | function inits(){ | |
19 | 19 | //init data | |
20 | 20 | var json = { | |
21 | "id": "target", | ||
22 | "name": "Target", | ||
21 | "id": "characteristics", | ||
22 | "name": "Characteristics", | ||
23 | 23 | "children": [ | |
24 | 24 | // Location | |
25 | 25 | { | |
26 | "id": "location", | ||
27 | "name": "Location", | ||
26 | "id": "character", | ||
27 | "name": "Character", | ||
28 | 28 | "data": { | |
29 | "band": "Target", | ||
29 | "band": "Characteristics", | ||
30 | 30 | "relation": "coordinators.html" | |
31 | 31 | }, | |
32 | 32 | "children": [{ | |
33 | "id": "bangalore", | ||
34 | "name": "Bangalore", | ||
33 | "id": "shiva", | ||
34 | "name": "Shiva", | ||
35 | 35 | "data": { | |
36 | "band": "Location", | ||
36 | "band": "Character", | ||
37 | 37 | "relation": "individual_ranganathan.html" | |
38 | 38 | }, | |
39 | 39 | "children": [] | |
40 | 40 | ||
41 | 41 | }, { | |
42 | "id": "mysore", | ||
43 | "name": "Mysore", | ||
42 | "id": "parvathi", | ||
43 | "name": "Parvathi", | ||
44 | 44 | "data": { | |
45 | "band": "Location", | ||
45 | "band": "Character", | ||
46 | 46 | "relation": "individual_sharat.html" | |
47 | 47 | }, | |
48 | 48 | "children": [] | |
49 | 49 | }, { | |
50 | "id": "hyderabad", | ||
51 | "name": "Hyderabad", | ||
50 | "id": "ganesha", | ||
51 | "name": "Ganesha", | ||
52 | 52 | "data": { | |
53 | "band": "Location", | ||
53 | "band": "Character", | ||
54 | 54 | "relation": "individual_sharat.html" | |
55 | 55 | }, | |
56 | 56 | "children": [] | |
57 | 57 | }, { | |
58 | "id": "bengal", | ||
59 | "name": "Bengal", | ||
58 | "id": "bramha", | ||
59 | "name": "Bramha", | ||
60 | 60 | "data": { | |
61 | "band": "Location", | ||
61 | "band": "Character", | ||
62 | 62 | "relation": "individual_sharat.html" | |
63 | 63 | }, | |
64 | 64 | "children": [] | |
65 | 65 | }, { | |
66 | "id": "delhi", | ||
67 | "name": "Delhi", | ||
66 | "id": "vishnu", | ||
67 | "name": "Vishnu", | ||
68 | 68 | "data": { | |
69 | "band": "Location", | ||
69 | "band": "Character", | ||
70 | 70 | "relation": "individual_sharat.html" | |
71 | 71 | }, | |
72 | 72 | "children": [] | |
73 | 73 | }, { | |
74 | "id": "chennai", | ||
75 | "name": "Chennai", | ||
74 | "id": "krishna", | ||
75 | "name": "Krishna", | ||
76 | 76 | "data": { | |
77 | "band": "Location", | ||
77 | "band": "Character", | ||
78 | 78 | "relation": "individual_muralimohan.html" | |
79 | 79 | }, | |
80 | 80 | "children": [] | |
81 | }, { | ||
82 | "id": "radha", | ||
83 | "name": "Radha", | ||
84 | "data": { | ||
85 | "band": "Character", | ||
86 | "relation": "individual_muralimohan.html" | ||
87 | }, | ||
88 | "children": [] | ||
81 | 89 | }] | |
82 | 90 | }, | |
83 | 91 | // Languages | |
84 | 92 | { | |
85 | "id": "languages", | ||
86 | "name": "Languages", | ||
93 | "id": "ornament", | ||
94 | "name": "Ornament", | ||
87 | 95 | "data": { | |
88 | "band": "Target", | ||
96 | "band": "Characteristics", | ||
89 | 97 | "relation": "cultural.html" | |
90 | 98 | }, | |
91 | 99 | "children": [{ | |
92 | "id": "kannada", | ||
93 | "name": "Kannada", | ||
100 | "id": "jewellery", | ||
101 | "name": "Jewellery", | ||
94 | 102 | "data": { | |
95 | "band": "Languages", | ||
103 | "band": "Ornament", | ||
96 | 104 | "relation": "project_murals.html" | |
97 | 105 | }, | |
98 | "children": [] | ||
106 | "children": [{ | ||
107 | "id": "ear-ring", | ||
108 | "name": "Ear-ring", | ||
109 | "data": { | ||
110 | "band": "Jewellery", | ||
111 | "relation": "project_murals.html" | ||
112 | }, | ||
113 | "children": [] | ||
114 | },{ | ||
115 | "id": "ring", | ||
116 | "name": "Ring", | ||
117 | "data": { | ||
118 | "band": "Jewellery", | ||
119 | "relation": "project_murals.html" | ||
120 | }, | ||
121 | "children": [] | ||
122 | },{ | ||
123 | "id": "nose-ring", | ||
124 | "name": "Nose-ring", | ||
125 | "data": { | ||
126 | "band": "Jewellery", | ||
127 | "relation": "project_murals.html" | ||
128 | }, | ||
129 | "children": [] | ||
130 | },{ | ||
131 | "id": "pendent", | ||
132 | "name": "Pendent", | ||
133 | "data": { | ||
134 | "band": "Jewellery", | ||
135 | "relation": "project_murals.html" | ||
136 | }, | ||
137 | "children": [] | ||
138 | },{ | ||
139 | "id": "ankelet", | ||
140 | "name": "Ankelet", | ||
141 | "data": { | ||
142 | "band": "Jewellery", | ||
143 | "relation": "project_murals.html" | ||
144 | }, | ||
145 | "children": [] | ||
146 | },{ | ||
147 | "id": "bracelet", | ||
148 | "name": "Bracelet", | ||
149 | "data": { | ||
150 | "band": "Jewellery", | ||
151 | "relation": "project_murals.html" | ||
152 | }, | ||
153 | "children": [] | ||
154 | },{ | ||
155 | "id": "bangles", | ||
156 | "name": "Bangles", | ||
157 | "data": { | ||
158 | "band": "Jewellery", | ||
159 | "relation": "project_murals.html" | ||
160 | }, | ||
161 | "children": [] | ||
162 | }] | ||
99 | 163 | }, { | |
100 | "id": "english", | ||
101 | "name": "English", | ||
164 | "id": "material", | ||
165 | "name": "Material", | ||
102 | 166 | "data": { | |
103 | "band": "Languages", | ||
167 | "band": "Ornament", | ||
104 | 168 | "relation": "project_knowledge.html" | |
105 | 169 | }, | |
106 | "children": [] | ||
107 | }, { | ||
108 | "id": "marathi", | ||
109 | "name": "Marathi", | ||
110 | "data": { | ||
111 | "band": "Languages", | ||
112 | "relation": "project_crafts.html" | ||
113 | }, | ||
114 | "children": [] | ||
115 | }, { | ||
116 | "id": "hindi", | ||
117 | "name": "Hindi", | ||
118 | "data": { | ||
119 | "band": "Languages", | ||
120 | "relation": "project_interfaces.html" | ||
121 | }, | ||
122 | "children": [] | ||
123 | }, { | ||
124 | "id": "tamil", | ||
125 | "name": "Tamil", | ||
126 | "data": { | ||
127 | "band": "Languages", | ||
128 | "relation": "project_intagible.html" | ||
129 | }, | ||
130 | "children": [] | ||
131 | }, { | ||
132 | "id": "telugu", | ||
133 | "name": "Telugu", | ||
134 | "data": { | ||
135 | "band": "Languages", | ||
136 | "relation": "project_original.html" | ||
137 | }, | ||
138 | "children": [] | ||
139 | }, { | ||
140 | "id": "gujarati", | ||
141 | "name": "Gujarati", | ||
142 | "data": { | ||
143 | "band": "Languages", | ||
144 | "relation": "project_memorilization.html" | ||
145 | }, | ||
146 | "children": [] | ||
147 | }, { | ||
148 | "id": "bengali", | ||
149 | "name": "Bengali", | ||
150 | "data": { | ||
151 | "band": "Languages", | ||
152 | "relation": "project_design.html" | ||
153 | }, | ||
154 | "children": [] | ||
170 | "children": [{ | ||
171 | "id": "gold", | ||
172 | "name": "Gold", | ||
173 | "data": { | ||
174 | "band": "Material", | ||
175 | "relation": "project_murals.html" | ||
176 | }, | ||
177 | "children": [] | ||
178 | },{ | ||
179 | "id": "silver", | ||
180 | "name": "Silver", | ||
181 | "data": { | ||
182 | "band": "Material", | ||
183 | "relation": "project_murals.html" | ||
184 | }, | ||
185 | "children": [] | ||
186 | },{ | ||
187 | "id": "bronze", | ||
188 | "name": "Bronze", | ||
189 | "data": { | ||
190 | "band": "Material", | ||
191 | "relation": "project_murals.html" | ||
192 | }, | ||
193 | "children": [] | ||
194 | },{ | ||
195 | "id": "ruby", | ||
196 | "name": "Ruby", | ||
197 | "data": { | ||
198 | "band": "Material", | ||
199 | "relation": "project_murals.html" | ||
200 | }, | ||
201 | "children": [] | ||
202 | },{ | ||
203 | "id": "copper", | ||
204 | "name": "Copper", | ||
205 | "data": { | ||
206 | "band": "Material", | ||
207 | "relation": "project_murals.html" | ||
208 | }, | ||
209 | "children": [] | ||
210 | },{ | ||
211 | "id": "diamond", | ||
212 | "name": "Diamond", | ||
213 | "data": { | ||
214 | "band": "Material", | ||
215 | "relation": "project_murals.html" | ||
216 | }, | ||
217 | "children": [] | ||
218 | },{ | ||
219 | "id": "topaz", | ||
220 | "name": "Topaz", | ||
221 | "data": { | ||
222 | "band": "Material", | ||
223 | "relation": "project_murals.html" | ||
224 | }, | ||
225 | "children": [] | ||
226 | }] | ||
155 | 227 | }] | |
156 | }, | ||
157 | // Style | ||
158 | { | ||
159 | "id": "style", | ||
160 | "name": "Style", | ||
161 | "data": { | ||
162 | "band": "Target", | ||
163 | "relation": "technology.html" | ||
164 | }, | ||
165 | "children": [{ | ||
166 | "id": "summary", | ||
167 | "name": "Summary", | ||
168 | "data": { | ||
169 | "band": "Style", | ||
170 | "relation": "project_features.html" | ||
171 | }, | ||
172 | "children": [] | ||
173 | }, { | ||
174 | "id": "abstract", | ||
175 | "name": "Abstract", | ||
176 | "data": { | ||
177 | "band": "Style", | ||
178 | "relation": "project_ontologies.html" | ||
179 | }, | ||
180 | "children": [] | ||
181 | }, { | ||
182 | "id": "simplification", | ||
183 | "name": "Simplification", | ||
184 | "data": { | ||
185 | "band": "Style", | ||
186 | "relation": "project_representation.html" | ||
187 | }, | ||
188 | "children": [] | ||
189 | }, { | ||
190 | "id": "translation", | ||
191 | "name": "Translation", | ||
192 | "data": { | ||
193 | "band": "Style", | ||
194 | "relation": "project_3dsurface.html" | ||
195 | }, | ||
196 | "children": [] | ||
197 | }, { | ||
198 | "id": "funny", | ||
199 | "name": "Funny", | ||
200 | "data": { | ||
201 | "band": "Style", | ||
202 | "relation": "project_immersion.html" | ||
203 | }, | ||
204 | "children": [] | ||
205 | }, { | ||
206 | "id": "imaginary", | ||
207 | "name": "Imaginary", | ||
208 | "data": { | ||
209 | "band": "Style", | ||
210 | "relation": "project_haptic.html" | ||
211 | }, | ||
212 | "children": [] | ||
213 | }] | ||
214 | 228 | }], | |
215 | 229 | "data": { | |
216 | 230 | "relation": "index.html" | |
… | … | ||
232 | 232 | }; | |
233 | 233 | //end | |
234 | 234 | var infovis = document.getElementById('infovis'); | |
235 | var w = 500; var h = 382;; | ||
235 | var w = infovis.offsetWidth + 500; var h = infovis.offsetHeight + 385; | ||
236 | 236 | ||
237 | 237 | //init Hypertree | |
238 | 238 | var ht = new $jit.Hypertree({ | |
… | … | ||
292 | 292 | } else if(node._depth == 1){ | |
293 | 293 | style.fontSize = "0.9em"; | |
294 | 294 | style.color = "#222"; | |
295 | } else if(node._depth == 2){ | ||
296 | style.fontSize = "0.7em"; | ||
297 | style.color = "#444"; | ||
298 | } | ||
295 | } // else if(node._depth == 2){ | ||
296 | // style.fontSize = "0.7em"; | ||
297 | // style.color = "#444"; | ||
298 | // } | ||
299 | 299 | else { | |
300 | 300 | style.display = 'none'; | |
301 | 301 | } | |
… | … | ||
312 | 312 | //end | |
313 | 313 | ht.controller.onComplete(); | |
314 | 314 | } | |
315 | |||
316 | document.addEventListener("DOMContentLoaded", inits, false); | ||
315 | 317 | ||
316 | 318 | /* ****************************************************************************************************** */ | |
317 | 319 |