File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,18 @@ const MarkerContent = ({
128
128
const [ xTranslation , yTranslation ] =
129
129
anchorPoint ?? AdvancedMarkerAnchorPoint [ 'BOTTOM' ] ;
130
130
131
+ let xTranslationFlipped = `-${ xTranslation } ` ;
132
+ let yTranslationFlipped = `-${ yTranslation } ` ;
133
+ if ( xTranslation . trimStart ( ) . startsWith ( '-' ) ) {
134
+ xTranslationFlipped = xTranslation . substring ( 1 ) ;
135
+ }
136
+ if ( yTranslation . trimStart ( ) . startsWith ( '-' ) ) {
137
+ yTranslationFlipped = yTranslation . substring ( 1 ) ;
138
+ }
139
+
131
140
// The "translate(50%, 100%)" is here to counter and reset the default anchoring of the advanced marker element
132
141
// that comes from the api
133
- const transformStyle = `translate(50%, 100%) translate(- ${ xTranslation } , - ${ yTranslation } )` ;
142
+ const transformStyle = `translate(50%, 100%) translate(${ xTranslationFlipped } , ${ yTranslationFlipped } )` ;
134
143
135
144
return (
136
145
// anchoring container
You can’t perform that action at this time.
0 commit comments