[Etoys] [FIX]Handle sizes

Karl karl.ramberg at comhem.se
Sat Oct 13 08:17:44 EDT 2007


"Change Set:        HandleSizeFix
Date:            13 October 2007
Author:            Karl Ramberg

Handles can pop up in various tools. This changeset fixes the size in 
various places"
-------------- next part --------------
'From etoys2.2 of 22 September 2007 [latest update: #1699] on 13 October 2007 at 2:16:18 pm'!
"Change Set:		HandleSizeFix
Date:			13 October 2007
Author:			Karl Ramberg

Handles can pop up in various tools. This changeset fixes the size in various places"!


!HandleMorph methodsFor: 'initialization' stamp: 'kfr 10/13/2007 13:57'!
initialize
	"initialize the state of the receiver"
	super initialize.
	""
	self extent: 16 @ 16.
	! !


!StarMorph methodsFor: 'editing' stamp: 'kfr 10/13/2007 13:59'!
addHandles
	| center | 
	self removeHandles.
	center _ vertices sum // vertices size.   "Average vertices to get the center"
	handles _ {center. vertices second} with: {#center. #outside} collect:
		[:p :which | (EllipseMorph newBounds: (Rectangle center: p extent: 16 at 16)
							color: Color yellow)
				on: #mouseDown send: #dragVertex:event:fromHandle:
						to: self withValue: which;
				on: #mouseMove send: #dragVertex:event:fromHandle:
						to: self withValue: which].
	self addAllMorphs: handles.
	self changed! !



More information about the etoys-dev mailing list