kitschpatrol / svelte-tweakpane-ui

A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.
https:///kitschpatrol.com/svelte-tweakpane-ui
MIT License
105 stars 3 forks source link

Empty titles break dragging behavior #1

Closed michealparks closed 9 months ago

michealparks commented 9 months ago

First of all, thank you for this amazing library!

Steps to reproduce:

<script lang="ts">
  import { Pane } from 'svelte-tweakpane-ui';
</script>

<!-- I've done this to avoid the default title that comes up -->
<Pane title='' position='draggable'>
  ...
</Pane>

When this is done the pane is no longer draggable.

kitschpatrol commented 9 months ago

Good catch, thank you!

The div that acts as the drag handle was collapsing to zero height in the absence of the title. Fixed in 1.0.1.

I also refined truncation behavior for long titles.