Commit bde7b0b1d8ff1cbe33f60dee2347d04ecb6973f0

  • avatar
  • Ajay kulkarni <ajaykools @gm…l.com>
  • Thu Jun 07 18:53:37 IST 2012
Created form and adds value onclick of item.
  • jit.js 21 ----------+++++++++++
  • openlayers.html 12 --++++++++++
  • tree.js 306 -------------------------------------------------------------------------------------------------------------------------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  • Diff rendering mode:
  • inline
  • side by side

jit.js

6737 };6737 };
6738 for(var z=0.31;z<=1;z+=0.01){6738 for(var z=0.31;z<=1;z+=0.01){
6739 var y=(1-Math.pow(z,C))/(1-z);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 return B(0.75)6745 return B(0.75)
6780 },6780 },
6781 onClick:function(y,w){6781 onClick:function(y,w){
6782// Ajay - Visual target selection6782// 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// Ajay - end of visual target selection6792// Ajay - end of visual target selection
6795 },6795 },
6796 move:function(A,y){6796 move:function(A,y){
6797 var x=r(A.x,A.y);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 this.busy=true;6799 this.busy=true;
6800 var w=this.graph.getClosestNodeToPos(x),6800 var w=this.graph.getClosestNodeToPos(x),
6801 z=this;this.graph.computeLevels(w.id,0);6801 z=this;this.graph.computeLevels(w.id,0);

openlayers.html

36 <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script>36 <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script>
37 <script type="text/javascript" src="myVector.js"></script>37 <script type="text/javascript" src="myVector.js"></script>
38 </head>38 </head>
39<body onload="init(); inits();" onclick="annotationTree()">
39<body onload="init();" onclick="annotationTree()">
40 <div id="header"><h1>Lepakshi Mural</h1></div>40 <div id="header"><h1>Lepakshi Mural</h1></div>
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 &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>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 &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>
42 <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU -->42 <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU -->
62 </ul>62 </ul>
63 </div>63 </div>
64 <script type="text/javascript" >resize()</script>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</body>74</body>
67</html>75</html>

tree.js

18function inits(){18function inits(){
19 //init data19 //init data
20 var json = {20 var json = {
21 "id": "target",
22 "name": "Target",
21 "id": "characteristics",
22 "name": "Characteristics",
23 "children": [23 "children": [
24 // Location24 // Location
25 {25 {
26 "id": "location",
27 "name": "Location",
26 "id": "character",
27 "name": "Character",
28 "data": {28 "data": {
29 "band": "Target",
29 "band": "Characteristics",
30 "relation": "coordinators.html"30 "relation": "coordinators.html"
31 },31 },
32 "children": [{32 "children": [{
33 "id": "bangalore",
34 "name": "Bangalore",
33 "id": "shiva",
34 "name": "Shiva",
35 "data": {35 "data": {
36 "band": "Location",
36 "band": "Character",
37 "relation": "individual_ranganathan.html"37 "relation": "individual_ranganathan.html"
38 },38 },
39 "children": []39 "children": []
4040
41 }, {41 }, {
42 "id": "mysore",
43 "name": "Mysore",
42 "id": "parvathi",
43 "name": "Parvathi",
44 "data": {44 "data": {
45 "band": "Location",
45 "band": "Character",
46 "relation": "individual_sharat.html"46 "relation": "individual_sharat.html"
47 },47 },
48 "children": []48 "children": []
49 }, {49 }, {
50 "id": "hyderabad",
51 "name": "Hyderabad",
50 "id": "ganesha",
51 "name": "Ganesha",
52 "data": {52 "data": {
53 "band": "Location",
53 "band": "Character",
54 "relation": "individual_sharat.html"54 "relation": "individual_sharat.html"
55 },55 },
56 "children": []56 "children": []
57 }, {57 }, {
58 "id": "bengal",
59 "name": "Bengal",
58 "id": "bramha",
59 "name": "Bramha",
60 "data": {60 "data": {
61 "band": "Location",
61 "band": "Character",
62 "relation": "individual_sharat.html"62 "relation": "individual_sharat.html"
63 },63 },
64 "children": []64 "children": []
65 }, {65 }, {
66 "id": "delhi",
67 "name": "Delhi",
66 "id": "vishnu",
67 "name": "Vishnu",
68 "data": {68 "data": {
69 "band": "Location",
69 "band": "Character",
70 "relation": "individual_sharat.html"70 "relation": "individual_sharat.html"
71 },71 },
72 "children": []72 "children": []
73 }, {73 }, {
74 "id": "chennai",
75 "name": "Chennai",
74 "id": "krishna",
75 "name": "Krishna",
76 "data": {76 "data": {
77 "band": "Location",
77 "band": "Character",
78 "relation": "individual_muralimohan.html"78 "relation": "individual_muralimohan.html"
79 },79 },
80 "children": []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 // Languages91 // Languages
84 {92 {
85 "id": "languages",
86 "name": "Languages",
93 "id": "ornament",
94 "name": "Ornament",
87 "data": {95 "data": {
88 "band": "Target",
96 "band": "Characteristics",
89 "relation": "cultural.html"97 "relation": "cultural.html"
90 },98 },
91 "children": [{99 "children": [{
92 "id": "kannada",
93 "name": "Kannada",
100 "id": "jewellery",
101 "name": "Jewellery",
94 "data": {102 "data": {
95 "band": "Languages",
103 "band": "Ornament",
96 "relation": "project_murals.html"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 "data": {166 "data": {
103 "band": "Languages",
167 "band": "Ornament",
104 "relation": "project_knowledge.html"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 "data": {229 "data": {
216 "relation": "index.html"230 "relation": "index.html"
232 };232 };
233 //end233 //end
234 var infovis = document.getElementById('infovis');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 //init Hypertree237 //init Hypertree
238 var ht = new $jit.Hypertree({238 var ht = new $jit.Hypertree({
292 } else if(node._depth == 1){292 } else if(node._depth == 1){
293 style.fontSize = "0.9em";293 style.fontSize = "0.9em";
294 style.color = "#222";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 else {299 else {
300 style.display = 'none';300 style.display = 'none';
301 }301 }
312 //end312 //end
313 ht.controller.onComplete();313 ht.controller.onComplete();
314}314}
315
316document.addEventListener("DOMContentLoaded", inits, false);
315317
316 /* ****************************************************************************************************** */318 /* ****************************************************************************************************** */
317319