annotorious / annotorious-openseadragon

An OpenSeadragon plugin for annotating high-res zoomable images
https://annotorious.github.io
BSD 3-Clause "New" or "Revised" License
121 stars 42 forks source link

Restriction of the initial drawing outside the image area. #112

Open ferose-chooch opened 2 years ago

ferose-chooch commented 2 years ago

As of now, we can initially draw outside the image by zooming out. It would be better if we can restrict it.

Screenshot from 2022-01-18 13-35-03

rsimon commented 2 years ago

I agree, this would be a sensible addition. Thanks for posting!

ferropasha commented 11 months ago

Are these methods related to this problem or do I misinterpret their meaning? If so, what are they intended to do? .fitBounds .fitBoundsWithConstraints P.S. Sorry, I have experimented with these methods and now understand their purpose. With regards to the original problem of restricting selection frame to the image boundaries, I noticed that it's impossible to move the frame beyond image borders when I move it around as a whole, but it is possible to do so when I drag by one of the corners. Is it possible to somehow adopt this restriction mechanism for the case of reshaping the frame with corner-drag?