cyrilf / vue-dat-gui

A Vue3 port of the popular dat.GUI library
https://cyrilf.github.io/vue-dat-gui/
MIT License
62 stars 9 forks source link

Import name #5

Closed notchris closed 5 years ago

notchris commented 5 years ago

Hello! This is a great port, thank you for making it.

I found that I could only import the module via: import DatGui from '@cyrilf/vue-dat-gui'; while the documentation says to use import DatGui from 'vue-dat-gui';

notchris commented 5 years ago

Saw its listed correctly on the github, this is only on npm.

cyrilf commented 5 years ago

Hey @notchris Good catch :v: There was one typo left in the README. But yeah, npm README is still outdated, I bumped the patch version and published it. I guess now it's only a matter of time before it gets updated. Thanks!

notchris commented 5 years ago

No problem @cyrilf

Since you can move the toggle-button location, can you make an option to have that either at the top of the listing or the bottom. Currently it defaults to bottom, but that may be useful to people who prefer to collapse in a layer-based system.

Thank you!

Chris

cyrilf commented 5 years ago

Thanks for the feedback. It's available in the latest version, v0.3.0 I added a prop closePosition that defaults to "bottom" but you can set it up to "top". You can use it like:

<dat-gui closeText="Close controls" openText="Open controls" closePosition="top">
  ...
</dat-gui>

I added it because it's easy to do. But I don't want to deviate too much in terms of functionality from what dat-gui are providing. Feel free to open a PR next time :v:

notchris commented 5 years ago

Ah thank you! And I agree. I'll make sure to make a PR. Thanks again!