[TASK] Remove jsHashes
This commit is contained in:
		
					parent
					
						
							
								a2ab0dce4f
							
						
					
				
			
			
				commit
				
					
						e32fe6648d
					
				
			
		
					 3 changed files with 5 additions and 9 deletions
				
			
		|  | @ -1,6 +1,5 @@ | |||
| define(["leaflet", "jshashes"], | ||||
|   function (L, jsHashes) { | ||||
|     var MD5 = new jsHashes.MD5(); | ||||
| define(["leaflet"], | ||||
|   function (L) { | ||||
| 
 | ||||
|     return L.TileLayer.Canvas.extend({ | ||||
|       setData: function (d) { | ||||
|  | @ -8,8 +7,7 @@ define(["leaflet", "jshashes"], | |||
| 
 | ||||
|         //pre-calculate start angles
 | ||||
|         this.data.all().forEach(function (d) { | ||||
|           var hash = MD5.hex(d.node.nodeinfo.node_id); | ||||
|           d.startAngle = (parseInt(hash.substr(0, 2), 16) / 255) * 2 * Math.PI; | ||||
|           d.startAngle = (parseInt(d.node.nodeinfo.node_id.substr(10, 2), 16) / 255) * 2 * Math.PI; | ||||
|         }); | ||||
|         this.redraw(); | ||||
|       }, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Xaver Maierhofer
				Xaver Maierhofer