[etoys-dev] Etoys: Morphic-bf.25.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jun 24 09:46:46 EDT 2010
Bert Freudenberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-bf.25.mcz
==================== Summary ====================
Name: Morphic-bf.25
Author: bf
Time: 24 June 2010, 3:45:23 pm
UUID: 2020b11f-00ea-45e3-9979-6304c7d88991
Ancestors: Morphic-bf.24
- grow equally in all directions on control-halo-drag
=============== Diff against Morphic-bf.24 ===============
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.
]!
More information about the etoys-dev
mailing list