Commit 689aa5f 1 parent 4ef2d65 commit 689aa5f Copy full SHA for 689aa5f
File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -188,11 +188,16 @@ const RouteMap = (props) => {
188
188
) ) }
189
189
{ projectedSymbols &&
190
190
projectedSymbols . length > 0 &&
191
- projectedSymbols . map ( ( symbol , index ) => (
192
- < ItemFixed key = { index } left = { symbol . sy } top = { symbol . sx } >
193
- < ZoneSymbol size = { symbol . size } zone = { symbol . zone } />
194
- </ ItemFixed >
195
- ) ) }
191
+ projectedSymbols . map ( ( symbol , index ) => {
192
+ const matchValues = symbol . size . match ( / \d + / ) ;
193
+ const symbolSizeNumber = matchValues ? parseInt ( matchValues [ 0 ] , 10 ) : null ;
194
+ const offset = symbolSizeNumber ? symbolSizeNumber / 2 : 0 ;
195
+ return (
196
+ < ItemFixed key = { index } left = { symbol . sy - offset } top = { symbol . sx - offset } >
197
+ < ZoneSymbol size = { symbol . size } zone = { symbol . zone } />
198
+ </ ItemFixed >
199
+ ) ;
200
+ } ) }
196
201
{ props . projectedTerminuses . map ( ( terminus , index ) => (
197
202
< ItemPositioned
198
203
key = { index }
You can’t perform that action at this time.
0 commit comments