Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make Detail scrollable and zoomable #38

Closed
wants to merge 7 commits into from

Conversation

vvvyyynet
Copy link
Collaborator

When user scrolls or zooms (=ctrl.+scroll) on Details table the selected window will adapt in Details as well as in Brush.

Main changes:

  • add wheel-listener in Details
  • remove brushE and replace with let selection = $state({start:number, end:number})
  • refactor some hardcoded defaults into an external Devilstable_DEFAULTS.json
  • change behavior of brush.move() in Brush, which now reacts to selection

Further changes and comments

  • I hope I got the typing right.
  • Of course, one could define the DEFAULTS in Devilstable.svelte, but I think it is cleaner to import from the .json instead of passing props.
  • I refactored or commented a few more things -> see the comments in the individual commits.

allows for rest-props other than label and puts focus on values.
use newly introduced defaults in Brush-props and set the defaults in Devilstable to undefined, since they will never be used.
some defaults were defined redundantly in multiple files.

The file only contains *functional* defaults, but no style-defaults, since they should be close to the components' tailwind-css
@vvvyyynet vvvyyynet added the enhancement New feature or request label Dec 16, 2024
@flicksolutions
Copy link
Member

This PR is kind of the wrong way round... I'm trying to fix this by pushing the changes you made onto https://github.com/DHBern/presentation_parzival/tree/32-devilstable-make-detail-scrollable then reset main to where it was (forcefully) and then create a new PR in the right direction. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants