@@ -368,13 +368,19 @@ var SystemMap = {
368368 jump = { type : gate . type } ;
369369 if ( gate . type == 'wormhole' ) {
370370 // exclude nodes that are outside this region from being anchored
371- if ( from . system . regionID == Data . state . vicinity . regionId && to . system . regionID != Data . state . vicinity . regionId ) {
371+ if ( from . system . regionID == system . regionID && to . system . regionID != system . regionID ) {
372372 exclude . push ( to . system . id ) ;
373+ delete to . x ;
374+ delete to . y ;
375+ delete to . system . x ;
376+ delete to . system . y ;
373377 }
374- else if ( to . system . regionID == Data . state . vicinity . regionId && from . system . regionID != Data . state . vicinity . regionId ) {
378+ else if ( to . system . regionID == system . regionID && from . system . regionID != system . regionID ) {
375379 exclude . push ( from . system . id ) ;
376- console . log ( to )
377-
380+ delete from . x ;
381+ delete from . y ;
382+ delete from . system . x ;
383+ delete from . system . y ;
378384 }
379385
380386 // pin the wormhole close to the connecting node
@@ -423,14 +429,14 @@ var SystemMap = {
423429 . chargeDistance ( 200 * SCALING_FACTOR )
424430 . linkDistance ( function ( l ) {
425431 if ( l . type == 'jumpbridge' ) return 0 ;
426- if ( l . type == 'wormhole' ) return 0 ;
432+ if ( l . type == 'wormhole' ) return 20 ;
427433 if ( l . source . fixed || l . target . fixed ) return 0 ;
428434 var dx = l . source . x - l . target . x , dy = l . source . y - l . target . y ;
429435 return Math . min ( 50 * SCALING_FACTOR , Math . sqrt ( dx * dx + dy * dy ) ) ;
430436 } )
431437 . linkStrength ( function ( l ) {
432438 if ( l . type == 'jumpbridge' ) return 0 ;
433- if ( l . type == 'wormhole' ) return 0 ;
439+ if ( l . type == 'wormhole' ) return 0.2 ;
434440 if ( l . source . fixed || l . target . fixed ) return 0.1 ;
435441 return 0.25 ;
436442 } ) ;
0 commit comments