Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Latest commit

 

History

History
60 lines (28 loc) · 2.42 KB

can-we-zoom-less-than-fit.md

File metadata and controls

60 lines (28 loc) · 2.42 KB

Can we zoom less than fit?

RazerEdge64 on 2021-04-19T08:04:22.719Z

Is there a way to zoom less than fit?

I am currently using a very cheeky way to do it (just by increasing the imageHeight and imageWidth).

in imageView.js

this.imageWidth = this.viewer.maxBounds().right*4;

this.imageHeight = this.viewer.maxBounds().bottom*4;

But, the viewer is sticking to the top left whenever we zoom in like this.

imageimage1638×758 80.1 KB

I am able to pan it later but, it is getting restricted near the bottom right area.

What can i do to avoid this?

Basically, i need to be able to show even level 0,1,2 tiles before jumping to Fit . And the tiles loaded at fit vary from image to image.


RazerEdge64 on 2021-04-19T08:05:57.180Z

Initially,

imageimage1637×823 223 KB

Here, level 2 tiles are being loaded. I would want to show even level 1 and level 0 which require zooming out.

Is there any way I can do it?


David_Manthey on 2021-04-19T12:10:21.538Z

There are a couple of parameters you can adjust to do this fairly easily. See HistomicsUI/ImageView.js at 4f6df240e127f1b1725ef2556798f299126dd798 · DigitalSlideArchive/HistomicsUI · GitHub – the extraPanWidth and extraPanHeight are used to change the bounds of the viewer, which is probably what you want. You can set the bounds more explicitly if that doesn’t give enough control.


RazerEdge64 on 2021-04-20T06:15:32.502Z

Following your advice worked!

I made extraPanWidth & extraPanHeight as 4.

imageimage1636×748 73.8 KB

Thank you @David_Manthey !