Closed dabreegster closed 9 months ago
Latest commit: a29734df528aff6417635c456640e7133ead759d
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Someone is attempting to deploy a commit to a Personal Account owned by @dimfeld on Vercel.
@dimfeld first needs to authorize it.
A bug I'm not sure how to fix: if one layer has hoverCursor
and another doesn't, as you transition between overlapping features for the two, the cursor isn't un-set when it should be
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
svelte-maplibre | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 4, 2023 1:27am |
I rebased, adding in the sourceLayer
fix to one spot.
This is imperfect with the hoverCursor
problem, but I think it's a good enough start
I would need to try it but I think adding
if (hoverCursor) {
$map.getCanvas().style.cursor = hoverCursor;
}
into the mousemove handler in Layer.svelte
would fix the hoverCursor thing.
I left a comment above about the default value for openIfTopMost
. Curious to get your thoughts on that but after that I think this is good to go.
I fixed the cursor behavior, and updated the example. The green layer has no cursor set, to demonstrate why it's necessary to reset to the empty string sometimes too. Now the cursor should always match the layer being hovered on.
Thanks for the help with the CSS alignment and tip about the cursor fix!
Looks good. Thank you again!
openIfTopMost for Popups.
This PR does two separate things: 1) Make the existing
eventsIfTopMost
option also apply to setting hover state 2) Introduce a newopenIfTopMost
for Popups that works the same wayThe existing demo page is extended to show all of this:
https://github.com/dimfeld/svelte-maplibre/assets/1664407/2c2046cc-1034-45eb-bde9-42fedab0a67e