Skip to content

Commit

Permalink
Merge pull request #37 from OpenPonk/master
Browse files Browse the repository at this point in the history
Fixed camera setters to be no longer persistent and reflect coord system
  • Loading branch information
akevalion committed Apr 18, 2023
2 parents c5bd596 + 146827e commit 8491ab1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Roassal3-Exporters/RSAbstractCamSetter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RSAbstractCamSetter >> set: aBlock [
| camera |
self setCanvasCamera.
camera := canvas camera copy.
camera matrix: canvas camera matrix copy.
self shouldUseDoubleDraw
ifTrue: [ canvas morph drawOnMockCanvas ].
self setCamera.
Expand Down
7 changes: 4 additions & 3 deletions src/Roassal3-Exporters/RSZoomToShapesSetter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ RSZoomToShapesSetter >> extent [

{ #category : #hooks }
RSZoomToShapesSetter >> setCamera [

| rect |
rect := canvas encompassingRectangle.
rect := canvas encompassingRectangle.
canvas camera
position: rect floatCenter;
scale: 1
privateScale: 1; "prevent announcements, similarly to position: vs translateTo:"
position: (canvas camera positionFromSpace: rect floatCenter)
]

0 comments on commit 8491ab1

Please sign in to comment.