File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 135135 const targetPy = - Number ( target [ 1 ] ) ;
136136 const targetNodeProjected = L . point ( topLeft . x + targetPx , topLeft . y + targetPy ) ;
137137 const targetNodeLatLng = map . unproject ( targetNodeProjected , zoom ) ;
138-
139- console . log ( soruce , sourceNodeLatLng )
140- console . log ( target , targetNodeLatLng )
141-
142138 data . coords [ 0 ] = [ sourceNodeLatLng . lng , sourceNodeLatLng . lat ] ;
143139 data . coords [ 1 ] = [ targetNodeLatLng . lng , targetNodeLatLng . lat ] ;
144140 } ) ;
Original file line number Diff line number Diff line change 7171 < script type ="text/javascript ">
7272 const map = new NetJSONGraph ( "../assets/data/netjsonmap.json" , {
7373 render : "map" ,
74+ // set map initial state.
7475 mapOptions : {
7576 center : [ 46.86764405052012 , 19.675998687744144 ] ,
7677 zoom : 5 ,
100101 id : "geographicMap" ,
101102 zoomLevel : 10 ,
102103 } ,
103-
104+ // Convert to internal json format
104105 prepareData : ( data ) => {
105106 data . nodes . map ( ( node ) => {
106107 node . label = node . name ;
You can’t perform that action at this time.
0 commit comments