The Trunk: Morphic-cbc.1452.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-cbc.1452.mcz

commits-2
Chris Cunningham uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cbc.1452.mcz

==================== Summary ====================

Name: Morphic-cbc.1452
Author: cbc
Time: 13 June 2018, 7:45:19.342537 pm
UUID: 16e46d7e-75d2-9047-a872-6f069d65920f
Ancestors: Morphic-cbc.1451

Recategorized #referencePositionInWorld (and setter) to be with related methods.
Fixed #adjustAfter: to once again allow halo rotation of morphs to actually rotate around the rotationCenter (instead of center of the morph).

=============== Diff against Morphic-cbc.1451 ===============

Item was added:
+ ----- Method: Morph>>referencePositionInWorld (in category 'rotate scale and flex') -----
+ referencePositionInWorld
+
+ ^ self pointInWorld: self referencePosition
+ !

Item was added:
+ ----- Method: Morph>>referencePositionInWorld: (in category 'rotate scale and flex') -----
+ referencePositionInWorld: aPoint
+ | localPosition |
+ localPosition := owner
+ ifNil: [aPoint]
+ ifNotNil: [(owner transformFrom: self world) globalPointToLocal: aPoint].
+
+ self referencePosition: localPosition
+ !

Item was changed:
  ----- Method: TransformationMorph>>adjustAfter: (in category 'private') -----
  adjustAfter: changeBlock
  "Cause this morph to remain cetered where it was before, and
  choose appropriate smoothing, after a change of scale or rotation."
  | oldRefPos |
  oldRefPos := self referencePosition.
  changeBlock value.
  self chooseSmoothing.
+ self penUpWhile: [self position: self position + (oldRefPos - self referencePosition)].
- self actorStateOrNil ifNotNil:[
- self penUpWhile: [self position: self position + (oldRefPos - self referencePosition)].
- ].
  self layoutChanged.
  owner ifNotNil: [owner invalidRect: bounds]
  !