Roassal3 icon indicating copy to clipboard operation
Roassal3 copied to clipboard

zoomToFit is called when a window is resized...

Open bergel opened this issue 5 years ago • 1 comments

This is wrong... ZoomToFit should be done only once, when opening the window

bergel avatar Nov 20 '20 20:11 bergel

What about rewriting the method:

RSZoomToFitCanvas >> onShape: aCanvas
	aCanvas when: RSKeyUp do: [ :evt | self processKeyUp: evt ].
"	aCanvas when: RSExtentChangedEvent do: [ self zoomToFitIfNecessary: aCanvas ]."
	aCanvas camera: (self cameraFor: aCanvas). 
	self configuration shouldZoomToFitOnStart ifFalse: [ ^ self ].
	aCanvas zoomToFit.

?

It seems to do a pretty good job. One simply need to press space to perform a zoom to fit.

bergel avatar Dec 01 '20 22:12 bergel

zoomToFit now is only enable when athens morph opens for first time After that the content does not change of size.

akevalion avatar Oct 12 '22 15:10 akevalion