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
(11 / 10)
  
67376737 };
67386738 for(var z=0.31;z<=1;z+=0.01){
67396739 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.
67426743 }
67436744 }
67446745 return B(0.75)
67806780 },
67816781 onClick:function(y,w){
67826782// 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);
67906790 }
67916791 }
67926792// Ajay - end of visual target selection
67956795 },
67966796 move:function(A,y){
67976797 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.
67996799 this.busy=true;
68006800 var w=this.graph.getClosestNodeToPos(x),
68016801 z=this;this.graph.computeLevels(w.id,0);
  
3636 <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script>
3737 <script type="text/javascript" src="myVector.js"></script>
3838 </head>
39<body onload="init(); inits();" onclick="annotationTree()">
39<body onload="init();" onclick="annotationTree()">
4040 <div id="header"><h1>Lepakshi Mural</h1></div>
4141 <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>
4242 <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU -->
6262 </ul>
6363 </div>
6464 <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>
6674</body>
6775</html>
tree.js
(161 / 145)
  
1818function inits(){
1919 //init data
2020 var json = {
21 "id": "target",
22 "name": "Target",
21 "id": "characteristics",
22 "name": "Characteristics",
2323 "children": [
2424 // Location
2525 {
26 "id": "location",
27 "name": "Location",
26 "id": "character",
27 "name": "Character",
2828 "data": {
29 "band": "Target",
29 "band": "Characteristics",
3030 "relation": "coordinators.html"
3131 },
3232 "children": [{
33 "id": "bangalore",
34 "name": "Bangalore",
33 "id": "shiva",
34 "name": "Shiva",
3535 "data": {
36 "band": "Location",
36 "band": "Character",
3737 "relation": "individual_ranganathan.html"
3838 },
3939 "children": []
4040
4141 }, {
42 "id": "mysore",
43 "name": "Mysore",
42 "id": "parvathi",
43 "name": "Parvathi",
4444 "data": {
45 "band": "Location",
45 "band": "Character",
4646 "relation": "individual_sharat.html"
4747 },
4848 "children": []
4949 }, {
50 "id": "hyderabad",
51 "name": "Hyderabad",
50 "id": "ganesha",
51 "name": "Ganesha",
5252 "data": {
53 "band": "Location",
53 "band": "Character",
5454 "relation": "individual_sharat.html"
5555 },
5656 "children": []
5757 }, {
58 "id": "bengal",
59 "name": "Bengal",
58 "id": "bramha",
59 "name": "Bramha",
6060 "data": {
61 "band": "Location",
61 "band": "Character",
6262 "relation": "individual_sharat.html"
6363 },
6464 "children": []
6565 }, {
66 "id": "delhi",
67 "name": "Delhi",
66 "id": "vishnu",
67 "name": "Vishnu",
6868 "data": {
69 "band": "Location",
69 "band": "Character",
7070 "relation": "individual_sharat.html"
7171 },
7272 "children": []
7373 }, {
74 "id": "chennai",
75 "name": "Chennai",
74 "id": "krishna",
75 "name": "Krishna",
7676 "data": {
77 "band": "Location",
77 "band": "Character",
7878 "relation": "individual_muralimohan.html"
7979 },
8080 "children": []
81 }, {
82 "id": "radha",
83 "name": "Radha",
84 "data": {
85 "band": "Character",
86 "relation": "individual_muralimohan.html"
87 },
88 "children": []
8189 }]
8290 },
8391 // Languages
8492 {
85 "id": "languages",
86 "name": "Languages",
93 "id": "ornament",
94 "name": "Ornament",
8795 "data": {
88 "band": "Target",
96 "band": "Characteristics",
8997 "relation": "cultural.html"
9098 },
9199 "children": [{
92 "id": "kannada",
93 "name": "Kannada",
100 "id": "jewellery",
101 "name": "Jewellery",
94102 "data": {
95 "band": "Languages",
103 "band": "Ornament",
96104 "relation": "project_murals.html"
97105 },
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 }]
99163 }, {
100 "id": "english",
101 "name": "English",
164 "id": "material",
165 "name": "Material",
102166 "data": {
103 "band": "Languages",
167 "band": "Ornament",
104168 "relation": "project_knowledge.html"
105169 },
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 }]
155227 }]
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 }]
214228 }],
215229 "data": {
216230 "relation": "index.html"
232232 };
233233 //end
234234 var infovis = document.getElementById('infovis');
235 var w = 500; var h = 382;;
235 var w = infovis.offsetWidth + 500; var h = infovis.offsetHeight + 385;
236236
237237 //init Hypertree
238238 var ht = new $jit.Hypertree({
292292 } else if(node._depth == 1){
293293 style.fontSize = "0.9em";
294294 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 // }
299299 else {
300300 style.display = 'none';
301301 }
312312 //end
313313 ht.controller.onComplete();
314314}
315
316document.addEventListener("DOMContentLoaded", inits, false);
315317
316318 /* ****************************************************************************************************** */
317319