AnythingZoomer icon indicating copy to clipboard operation
AnythingZoomer copied to clipboard

Make zoomDim configurable in options

Open ambischof opened this issue 7 years ago • 1 comments

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]
});

ambischof avatar Jul 05 '17 21:07 ambischof

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;
}

Mottie avatar Jul 05 '17 21:07 Mottie