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

Make zoomDim configurable in options #40

Open
ambischof opened this issue Jul 5, 2017 · 1 comment
Open

Make zoomDim configurable in options #40

ambischof opened this issue Jul 5, 2017 · 1 comment

Comments

@ambischof
Copy link

ambischof commented Jul 5, 2017

I would like the size of the zoom window to be configurable in the options. If there is already a way to accomplish this, please, just let me know; I just couldn't find it.

Right now, I can only get this seemingly undocumented signature to do it (and this only works after it's already initialized)

var xoffset = 0, 
yoffset= 0,
zoomDimension = [200,200];
$('#container').anythingZoomer(xoffset, yoffset, zoomDimension)

The other hackish way to do it is this: (seems to work the best)

$('#container').anythingZoomer({
  initialized: function(){
     $('#container').data('zoomer').last = [200,200];
  }
})

What I would like to do:

$('#container').anythingZoomer({
  zoomDim: [200,200]
});
@Mottie
Copy link
Contributor

Mottie commented Jul 5, 2017

Hi @ambischof!

You can set the initial zoom window size using css... the anythingzoomer.css file defines the size to be a 110px square, but you can add any custom overrides - check out this demo:

.az-zoom {
  width: 300px;
  height: 300px;
}

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

No branches or pull requests

2 participants