'From etoys3.0 of 24 February 2008 [latest update: #2084] on 25 August 2008 at 3:00:14 pm'! "Change Set: flipFix-bf Date: 25 August 2008 Author: Bert Freudenberg When rotationStyle is set to flip left-right or up-down, do not flip the graphic while editing the forward direction. At least this is how appears to the user, internally we actually flip the graphic if it will be flipped back by the rendering code."! !SketchMorph methodsFor: 'geometry eToy' stamp: 'bf 8/25/2008 14:53'! setDirectionFrom: aPoint "This is called when changing the forward direction by the halo arrow. If rotationStyle is set to flipping, the rendering code flips the form. We 'pre-flip' it here because otherwise there would be no way to actually set the forward direction without having the object visually flip while doing so." | wasFlipped isFlipped | rotationStyle == #leftRight ifTrue: [wasFlipped := self heading \\ 360 - self forwardDirection asSmallAngleDegrees > 180]. rotationStyle == #upDown ifTrue: [wasFlipped := self heading - 90 \\ 360 - (self forwardDirection - 90) asSmallAngleDegrees > 180]. super setDirectionFrom: aPoint. rotationStyle == #leftRight ifTrue: [isFlipped := self heading \\ 360 - self forwardDirection asSmallAngleDegrees > 180. wasFlipped == isFlipped ifFalse: [self form: (self form flipBy: #horizontal centerAt: self form center)]]. rotationStyle == #upDown ifTrue: [isFlipped := self heading - 90 \\ 360 - (self forwardDirection - 90) asSmallAngleDegrees > 180. wasFlipped == isFlipped ifFalse: [self form: (self form flipBy: #vertical centerAt: self form center)]]! !