Skip to content

Commit

Permalink
add a dummy div to RCustom to allow for an insertion anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Sep 24, 2024
1 parent d8023c7 commit 4de7c24
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/control/RCustom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ export default class RCustom extends RControlBase<RControlProps, Record<string,

render(): JSX.Element {
return (
<div className={['ol-control', this.props.className].join(' ')} ref={this.targetRef}>
{this.props.children}
</div>
<>
<div className='_rlayers_RCustomControl'></div>
<div
className={['ol-control', this.props.className].join(' ')}
ref={this.targetRef}
>
{this.props.children}
</div>
</>
);
}
}

0 comments on commit 4de7c24

Please sign in to comment.