sveltekit-svg icon indicating copy to clipboard operation
sveltekit-svg copied to clipboard

The "bind:this" directive doesn't work with sveltekit-svg

Open geohuz opened this issue 1 year ago • 4 comments

<script>
  import BaseSvg from "./map2.svg?component";
  let base;

  $effect(() => {
    console.log(base); // --> {}
  });
</script>

<BaseSvg bind:this={base} />

I'm trying to use the getBBox() to get the dimension of mounted component, but it is {} and doesn't work.

geohuz avatar Oct 27 '24 15:10 geohuz