The Trunk: Morphic-bf.449.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-bf.449.mcz

commits-2
Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.449.mcz

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

Name: Morphic-bf.449
Author: bf
Time: 24 June 2010, 3:41:52.939 pm
UUID: f588bcdb-0e0e-4541-aa83-224c90a97e60
Ancestors: Morphic-bf.448

- grow equally in all directions on ctrl-halo drag

=============== Diff against Morphic-bf.448 ===============

Item was changed:
  ----- Method: HaloMorph>>mouseMove: (in category 'event handling') -----
  mouseMove: evt
  "Drag our target around or resize it"
  growingOrRotating
  ifTrue: [
+ | oldExtent newExtent newPosition |
+ newExtent := originalExtent + (evt position - positionOffset * 2).
- | newExtent |
- newExtent := originalExtent + evt position - positionOffset.
  (newExtent x > 1 and: [newExtent y > 1])
+ ifTrue: [
+ oldExtent := target extent.
+ target setExtentFromHalo: newExtent.
+ newPosition := target position - (target extent - oldExtent // 2).
+ target setConstrainedPosition: newPosition hangOut: true]]
- ifTrue: [ target renderedMorph setExtentFromHalo: newExtent]]
  ifFalse: [
  | thePoint |
  thePoint := target point: (evt position - positionOffset) from: owner.
  target setConstrainedPosition: thePoint hangOut: true.
  ]!