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(navigator): add option autoFade #935

Merged
merged 1 commit into from
May 16, 2016
Merged

feat(navigator): add option autoFade #935

merged 1 commit into from
May 16, 2016

Conversation

leesei
Copy link
Contributor

@leesei leesei commented May 6, 2016

I would like to control the visibility of navigator minimap in my application, so I added an option to prevent autoFade.

This is my code for toggling:

navigationElement = viewer.navigator.element;
navigationElement.classList.toggle('navigatorHidden');
// OR
navigationElement.style.visibility = 'hidden';
.navigatorHidden {
  visibility: hidden;
}

@leesei
Copy link
Contributor Author

leesei commented May 6, 2016

Any comments on this feature?
I have yet to add test for this.

@iangilman
Copy link
Member

Beautiful! Good idea, well implemented.

I don't know that a test for this feature is necessary, but I'm happy to have one if you want. Let me know either way; otherwise I think it's ready to land.

@avandecreme
Copy link
Member

Should that line be changed to options.autoFade as well?
https://github.com/openseadragon/openseadragon/pull/935/files#diff-1aad0827e27dc50095117096590b4f21L91

Note that it would change the default value to true.

@leesei
Copy link
Contributor Author

leesei commented May 14, 2016

@iangilman If you're okay with it I think adding an usage on the example page after this feature has landed is good enough. I can work on that then.

@avandecreme if the user is specifying an id for navigator, that would imply they need total control. So OSD wouldn't autofade for them. That's the original idea and I'm buying that (see openseadragon.js:L357).
What I did was to let OSD not to autofade the automatically generated navigator.

@iangilman
Copy link
Member

@avandecreme Good spotting, but yeah, I'm fine with keeping that path manual, and that's how @leesei has set up the docs.

@leesei I'll go ahead and land. Thank you for the patch!

@iangilman iangilman merged commit ea32e1b into openseadragon:master May 16, 2016
iangilman added a commit that referenced this pull request May 16, 2016
@leesei
Copy link
Contributor Author

leesei commented May 17, 2016

For the example of this feature, do I add HTML to this page directly?
https://github.com/openseadragon/openseadragon.github.com/blob/master/examples/ui-viewport-navigator/index.html

@iangilman
Copy link
Member

Actually that's just the built version... to make the change you need to modify the file in this other project:

https://github.com/openseadragon/site-build/blob/master/www/ui-viewport-navigator.html

@leesei
Copy link
Contributor Author

leesei commented May 17, 2016

Glad I asked. PR coming in a few days.

dthornley pushed a commit to picturae/openseadragon that referenced this pull request Jun 9, 2016
* upstream/master: (157 commits)
  Attempting to fix Gitter badge for npm
  Started 2.2.1 "in progress" for changelog
  Version bump to 2.2.0
  Changelog for openseadragon#948
  Fix openseadragon#946
  Changelog for openseadragon#939
  Fix fitBounds with extreme zoom values.
  Changelog for openseadragon#930
  Changelog for openseadragon#940
  Add unit tests for multi-touch
  Enforce html element width and height to 100% when going full page.
  Changelog for openseadragon#935
  Correctly handle touch PointerEvents
  Handle simultaneous touch events
  Fix jshint.
  Avoid loading clipped out tiles. Fix openseadragon#889.
  Changelog for openseadragon#934
  Fix resize handling.
  Fix applyConstraints with rotation.
  Restore applyConstraints to avoid panning when clicking at max zoom.
  ...
Pin0 added a commit to picturae/openseadragon that referenced this pull request Jun 16, 2016
* upstream/master: (182 commits)
  Changelog for openseadragon#965
  simplified constraint code
  Code that fixes openseadragon#890, new test passes.  Events.js test needed fixing with good value, unrelated to actual test.
  Test that shows the bug openseadragon#890, fails
  Attempting to fix Gitter badge for npm
  Started 2.2.1 "in progress" for changelog
  Version bump to 2.2.0
  Changelog for openseadragon#948
  Fix openseadragon#946
  Changelog for openseadragon#939
  Fix fitBounds with extreme zoom values.
  Changelog for openseadragon#930
  Changelog for openseadragon#940
  Add unit tests for multi-touch
  Enforce html element width and height to 100% when going full page.
  Changelog for openseadragon#935
  Correctly handle touch PointerEvents
  Handle simultaneous touch events
  Fix jshint.
  Avoid loading clipped out tiles. Fix openseadragon#889.
  ...
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.

3 participants