mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
Fix compressed popup when reaching right bound of map (#823)
This commit is contained in:
parent
277ce9c39d
commit
2dabdf0447
@ -133,12 +133,14 @@ export default class Popup extends BaseControl<PopupProps, *, HTMLDivElement> {
|
||||
const {viewport} = this._context;
|
||||
const {offsetLeft, offsetTop, sortByDepth} = this.props;
|
||||
const anchorPosition = ANCHOR_POSITION[positionType];
|
||||
|
||||
const left = x + offsetLeft;
|
||||
const top = y + offsetTop;
|
||||
const style = {
|
||||
position: 'absolute',
|
||||
left: x + offsetLeft,
|
||||
top: y + offsetTop,
|
||||
transform: `translate(${-anchorPosition.x * 100}%, ${-anchorPosition.y * 100}%)`,
|
||||
transform: `
|
||||
translate(${-anchorPosition.x * 100}%, ${-anchorPosition.y * 100}%)
|
||||
translate(${left}px, ${top}px)
|
||||
`,
|
||||
display: undefined,
|
||||
zIndex: undefined
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user