Roassal3
Roassal3 copied to clipboard
zoomToFit is called when a window is resized...
This is wrong... ZoomToFit should be done only once, when opening the window
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.
zoomToFit now is only enable when athens morph opens for first time After that the content does not change of size.