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

drift.hide() does not hide zoomPane #73

Closed
nikugogoi opened this issue Jul 24, 2018 · 3 comments
Closed

drift.hide() does not hide zoomPane #73

nikugogoi opened this issue Jul 24, 2018 · 3 comments

Comments

@nikugogoi
Copy link

nikugogoi commented Jul 24, 2018

currently I have only seen the option for disabling the trigger to show the zoom pane. The resulting behaviour is that even after the trigger is disabled the zoom pane does not disappear if active. So, one might need to programmatically hide/remove the zoom pane.
After going through your code I was able to do the same like this :

var drift = new Drift(document.querySelector("img"), {
  inlinePane : true,
  paneContainer: document.querySelector("p")
});
// disabling trigger and hiding/removing the zoom pane
drift.disable();
drift.zoomPane.hide();

Please let me know if there is a better way or we could expose the hide method in the drift instance in a proper way

@frederickfogerty
Copy link
Contributor

Hi @nikugogoi thanks for the issue. I think it makes sense for drift.disable() to also ensure that the ZoomPane is hidden, so we should update this behaviour. Is this in line with what you'd expect to happen?

@frederickfogerty frederickfogerty changed the title hide zoom pane programatically drift.hide() does not hide zoomPane Jul 25, 2018
@nikugogoi
Copy link
Author

hi @frederickfogerty, I have no problem in the behaviour that you mention. I just thought there should be a way in which we can remove/hide the zoompane in the DOM. So I am leaving the implementation to you guys, who are managing this awesome package 👍 , to ensure we are on the same page.

@frederickfogerty
Copy link
Contributor

Awesome, thanks @nikugogoi we'll get onto this when we focus on this package next (not sure when that will happen, could be a month or so).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants