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

Added 'containers' option #258

Merged
merged 21 commits into from
Jun 22, 2019
Merged

Added 'containers' option #258

merged 21 commits into from
Jun 22, 2019

Conversation

chrisn
Copy link
Member

@chrisn chrisn commented Mar 6, 2019

This pull request adds a containers option that allows users to select whether the overview waveform, zoomable waveform, or both, are rendered. See #2, #222, #53, #193, #46.

- Added demo pages
- Update unit tests
- Avoid resampling waveform to zero width
- Don't hide container elements on resize
- Fix overview waveform rendering on resize
@chrisn chrisn marked this pull request as ready for review May 31, 2019 21:19
chrisn and others added 10 commits June 2, 2019 20:07
- Instances should be created via 'Peaks.init()', rather than 'new Peaks()'
- Added WaveformBuilder class, to separate requesting / creating waveform data
  from view initialisation
- Added ViewController
- Removed 'error', 'waveform_ready.zoomview', 'waveform_ready.overview' events
@zachsa
Copy link
Contributor

zachsa commented Jun 11, 2019

@chrisn - this looks pretty helpful! I would also like to be able to toggle zoomed/normal container programmatically.

So the use case I'm thinking of would be a 'show more' button that then displayed the zoomable section.

Is it possible to choose which of the containers appears on top? (at the moment the zoomed container is always on top?)

@zachsa
Copy link
Contributor

zachsa commented Jun 11, 2019

@chrisn - this looks pretty helpful! I would also like to be able to toggle zoomed/normal container programmatically.

So the use case I'm thinking of would be a 'show more' button that then displayed the zoomable section.

Is it possible to choose which of the containers appears on top? (at the moment the zoomed container is always on top?)

But also... if these were useful, I think that should be a separate pull request. Being able to hide one or another container would be immediately useful.

@chrisn
Copy link
Member Author

chrisn commented Jun 11, 2019

I would also like to be able to toggle zoomed/normal container programmatically.

Yes, let's follow this up in a separate issue / PR.

Is it possible to choose which of the containers appears on top? (at the moment the zoomed container is always on top?)

This is controlled by your page layout and styling. If you want the zoomed container to appear below, you can order the divs as needed, or apply styling to position them:

<div id="waveform-container">
  <div id="overview-container"></div>
  <div id="zoomview-container"></div>
</div>

@chrisn chrisn merged commit c02f35b into master Jun 22, 2019
@chrisn chrisn deleted the containers-option branch June 22, 2019 22:37
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