generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Search Results expand bug and cleanup
- Loading branch information
1 parent
496070f
commit 0f6d8c2
Showing
17 changed files
with
247 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import { useEffect } from 'react' | ||
import L from 'leaflet' | ||
|
||
export function useMapCrosshairsCursor(map: L.Map) { | ||
export function useMapCrosshairsCursor(map: L.Map, enabled = true) { | ||
// Show crosshairs cursor | ||
useEffect(() => { | ||
// @ts-ignore | ||
const container = map._container | ||
if (container) { | ||
L.DomUtil.addClass(container, 'crosshairs-cursor') | ||
if (enabled) { | ||
L.DomUtil.addClass(container, 'crosshairs-cursor') | ||
} | ||
return () => { | ||
L.DomUtil.removeClass(container, 'crosshairs-cursor') | ||
} | ||
} | ||
}, [map]) | ||
}, [map, enabled]) | ||
|
||
return null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.