'From Squeak3.1alpha of 28 February 2001 [latest update: #3785] on 11 March 2001 at 2:14:20 pm'! "Change Set: StarHandleFix Date: 11 March 2001 Author: Dan Ingalls Fixes the handles for Star morphs. The essence of the fix was to add mouseDown sensitivity to the handles. But I also cleaned up the code a bit. "! !StarMorph methodsFor: 'as yet unclassified' stamp: 'di 3/11/2001 13:55'! 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: 8@8) color: Color yellow) on: #mouseDown send: #dragVertex:fromHandle:vertIndex: to: self withValue: which; on: #mouseMove send: #dragVertex:fromHandle:vertIndex: to: self withValue: which]. self addAllMorphs: handles. self changed! ! !StarMorph methodsFor: 'as yet unclassified' stamp: 'di 3/11/2001 14:09'! dragVertex: evt fromHandle: handle vertIndex: label | ext oldR pt center | label == #center ifTrue: [self position: self position + (evt cursorPoint - handle center)]. label == #outside ifTrue: [center _ handles first center. pt _ center - evt cursorPoint. ext _ pt r. oldR _ ext. vertices _ (0 to: 359 by: (360//vertices size)) collect: [:angle | (Point r: (oldR _ oldR = ext ifTrue: [ext*5//12] ifFalse: [ext]) degrees: angle + pt degrees) + center]. handle align: handle center with: evt cursorPoint]. self computeBounds. ! !