@@ -62,10 +62,18 @@ var Panel = {
62
62
'.allow_diagonal:checked' ) . val ( ) !== 'undefined' ;
63
63
biDirectional = typeof $ ( '#breadthfirst_section ' +
64
64
'.bi-directional:checked' ) . val ( ) !== 'undefined' ;
65
+ dontCrossCorners = typeof $ ( '#breadthfirst_section ' +
66
+ '.dont_cross_corners:checked' ) . val ( ) !== 'undefined' ;
65
67
if ( biDirectional ) {
66
- finder = new PF . BiBreadthFirstFinder ( { allowDiagonal : allowDiagonal } ) ;
68
+ finder = new PF . BiBreadthFirstFinder ( {
69
+ allowDiagonal : allowDiagonal ,
70
+ dontCrossCorners : dontCrossCorners
71
+ } ) ;
67
72
} else {
68
- finder = new PF . BreadthFirstFinder ( { allowDiagonal : allowDiagonal } ) ;
73
+ finder = new PF . BreadthFirstFinder ( {
74
+ allowDiagonal : allowDiagonal ,
75
+ dontCrossCorners : dontCrossCorners
76
+ } ) ;
69
77
}
70
78
break ;
71
79
@@ -74,15 +82,19 @@ var Panel = {
74
82
'.allow_diagonal:checked' ) . val ( ) !== 'undefined' ;
75
83
biDirectional = typeof $ ( '#bestfirst_section ' +
76
84
'.bi-directional:checked' ) . val ( ) !== 'undefined' ;
85
+ dontCrossCorners = typeof $ ( '#bestfirst_section ' +
86
+ '.dont_cross_corners:checked' ) . val ( ) !== 'undefined' ;
77
87
heuristic = $ ( 'input[name=bestfirst_heuristic]:checked' ) . val ( ) ;
78
88
if ( biDirectional ) {
79
89
finder = new PF . BiBestFirstFinder ( {
80
90
allowDiagonal : allowDiagonal ,
91
+ dontCrossCorners : dontCrossCorners ,
81
92
heuristic : PF . Heuristic [ heuristic ]
82
93
} ) ;
83
94
} else {
84
95
finder = new PF . BestFirstFinder ( {
85
96
allowDiagonal : allowDiagonal ,
97
+ dontCrossCorners : dontCrossCorners ,
86
98
heuristic : PF . Heuristic [ heuristic ]
87
99
} ) ;
88
100
}
@@ -93,10 +105,18 @@ var Panel = {
93
105
'.allow_diagonal:checked' ) . val ( ) !== 'undefined' ;
94
106
biDirectional = typeof $ ( '#dijkstra_section ' +
95
107
'.bi-directional:checked' ) . val ( ) !== 'undefined' ;
108
+ dontCrossCorners = typeof $ ( '#dijkstra_section ' +
109
+ '.dont_cross_corners:checked' ) . val ( ) !== 'undefined' ;
96
110
if ( biDirectional ) {
97
- finder = new PF . BiDijkstraFinder ( { allowDiagonal : allowDiagonal } ) ;
111
+ finder = new PF . BiDijkstraFinder ( {
112
+ allowDiagonal : allowDiagonal ,
113
+ dontCrossCorners : dontCrossCorners
114
+ } ) ;
98
115
} else {
99
- finder = new PF . DijkstraFinder ( { allowDiagonal : allowDiagonal } ) ;
116
+ finder = new PF . DijkstraFinder ( {
117
+ allowDiagonal : allowDiagonal ,
118
+ dontCrossCorners : dontCrossCorners
119
+ } ) ;
100
120
}
101
121
break ;
102
122
0 commit comments