Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rgieseke
Copy link
Contributor

The errors were

layercake/src/_components/Map.svg.svelte:47:10
Error: 'this' implicitly has type 'any' because it does not have a type annotation. (js)
            return function handleMousemoveFn(e) {
                        raise(this);
                        // When the element gets raised, it flashes 0,0 for a second so skip that

layercake/src/_components/Map.svg.svelte:56:35
Error: Type '(e: MouseEvent) => void' is not assignable to type 'FocusEventHandler<SVGGElement>'.
  Types of parameters 'e' and 'event' are incompatible.
    Type 'FocusEvent & { currentTarget: EventTarget & SVGGElement; }' is missing the following properties from type 'MouseEvent': altKey, button, buttons, clientX, and 18 more. (js)

<g class="map-group" {onmouseout} onblur={onmouseout} role="tooltip">
        {#each features || $data.features as feature}

This just ignores the this error and removes the onblur handler. I t think it might not be needed. In the example, it seems it's only possible to focus the map in Chrome (not in Firefox) with tabbing to it, but not individual states. So if you blur the map there won't be any highlighted state tooltips.

@mhkeller mhkeller merged commit 22e075c into mhkeller:main Aug 19, 2025
6 checks passed
@rgieseke rgieseke deleted the fix-map-svg-types branch August 19, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants