Skip to content

Commit

Permalink
chore(app): create hook tp place items in mapview
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh authored and stdavis committed Jan 25, 2021
1 parent ad1eb67 commit 60860a9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ClientApp/src/useViewUiPosition.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';

export default function useViewUiPosition(view, position) {
const me = React.useRef();

React.useEffect(() => {
view?.ui.add(me.current, position);

}, [position, view]);

return me;
};

0 comments on commit 60860a9

Please sign in to comment.