[etoys-dev] Etoys: MorphicExtras-kfr.75.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 7 02:49:30 EST 2013


Karl Ramberg uploaded a new version of MorphicExtras to project Etoys:
http://source.squeak.org/etoys/MorphicExtras-kfr.75.mcz

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

Name: MorphicExtras-kfr.75
Author: kfr
Time: 7 February 2013, 8:47:50 am
UUID: 7474776e-661d-c346-93a1-76279bb4a3a7
Ancestors: MorphicExtras-bf.74

Fix DNU from rotating FlapTabs. There are still other issues with rotating FlapTabs that are not addressed

=============== Diff against MorphicExtras-bf.74 ===============

Item was changed:
  ----- Method: FlapTab>>computeEdgeFraction (in category 'edge') -----
  computeEdgeFraction
  	"Compute and remember the edge fraction"
  
  	| aBox aFraction |
  	self isCurrentlySolid ifTrue: [^ edgeFraction ifNil: [self edgeFraction: 0.5]].
  
+ 	aBox _ ((self pasteUpMorph ifNil: [ActiveWorld]) bounds) insetBy: (self extent // 2).
- 	aBox _ ((owner ifNil: [ActiveWorld]) bounds) insetBy: (self extent // 2).
  	aFraction _ self
  		ifVertical: 
  			[(self center y - aBox top) / (aBox height max: 1)]
  		ifHorizontal:
  			[(self center x - aBox left) / (aBox width max: 1)].
  	^ self edgeFraction: aFraction!

Item was changed:
  ----- Method: FlapTab>>fitOnScreen (in category 'positioning') -----
  fitOnScreen
  	"19 sept 2000 - allow flaps in any paste up"
  	| constrainer t l |
+ 	constrainer := self pasteUpMorph ifNil: [self].
- 	constrainer _ owner ifNil: [self].
  	self flapShowing "otherwise no point in doing this"
  		ifTrue:[self spanWorld].
  	self orientation == #vertical ifTrue: [
  		t _ ((self top min: (constrainer bottom- self height)) max: constrainer top).
  		t = self top ifFalse: [self top: t].
  	] ifFalse: [
  		l _ ((self left min: (constrainer right - self width)) max: constrainer left).
  		l = self left ifFalse: [self left: l].
  	].
  	self flapShowing ifFalse: [self positionObject: self atEdgeOf: constrainer].
  !



More information about the etoys-dev mailing list