'From etoys2.1 of 8 August 2007 [latest update: #1636] on 14 September 2007 at 11:59:30 am'! "Change Set: FlapMargin-yo Date: 14 September 2007 Author: Yoshiki Ohshima Add a variable to control the location of referent. #spanWorld was rigid about the positioning of its referent. referentMargin variable is used to pad the space around referent."! ReferenceMorph subclass: #FlapTab instanceVariableNames: 'flapShowing edgeToAdhereTo slidesOtherObjects popOutOnDragOver popOutOnMouseOver inboard dragged lastReferentThickness edgeFraction labelString referentMargin' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Flaps'! !FlapTab methodsFor: 'positioning' stamp: 'yo 9/14/2007 11:51'! referentMargin ^ referentMargin ifNil: [0@0]. ! ! !FlapTab methodsFor: 'positioning' stamp: 'yo 9/14/2007 11:55'! referentMargin: aPointOrNil referentMargin _ aPointOrNil. ! ! !FlapTab methodsFor: 'positioning' stamp: 'yo 9/14/2007 11:52'! spanWorld | container | container _ self pasteUpMorph ifNil: [self currentWorld]. (self orientation == #vertical) ifTrue: [ referent vResizing == #rigid ifTrue:[referent height: container height]. referent hResizing == #rigid ifTrue:[referent width: (referent width min: container width - self width)]. referent top: container top + self referentMargin y. ] ifFalse: [ referent hResizing == #rigid ifTrue:[referent width: container width]. referent vResizing == #rigid ifTrue:[referent height: (referent height min: container height - self height)]. referent left: container left + self referentMargin x. ] ! !