'From etoys2.1 of 26 July 2007 [latest update: #1547] on 12 August 2007 at 3:27:03 am'! "Change Set: pickerForRotated-sw Date: 12 August 2007 Author: Scott Wallace Position the modal color-picker properly on rotated objects."! !ColorPickerMorph methodsFor: 'menu' stamp: 'sw 8/12/2007 03:24'! pickUpColorFor: aMorph "Show the eyedropper cursor, and modally track the mouse through a mouse-down and mouse-up cycle" | aHand localPt c | aHand _ aMorph ifNil: [self activeHand] ifNotNil: [aMorph activeHand]. aHand ifNil: [aHand _ self currentHand]. self addToWorld: aHand world near: (aMorph ifNil: [aHand world]) fullBoundsInWorld. self owner ifNil: [^ self]. aHand showTemporaryCursor: (ScriptingSystem formAtKey: #Eyedropper) hotSpotOffset: 6 negated @ 4 negated. "<<<< the form was changed a bit??" self updateContinuously: false. [Sensor anyButtonPressed] whileFalse: [self trackColorUnderMouse]. self deleteAllBalloons. localPt _ Sensor cursorPoint - self topLeft. (OpenFullBox containsPoint: localPt) ifTrue: [^ self openPropertySheet]. self inhibitDragging ifFalse: [ (DragBox containsPoint: localPt) ifTrue: ["Click or drag the drag-dot means to anchor as a modeless picker" ^ self anchorAndRunModeless: aHand]. ]. (clickedTranslucency _ TransparentBox containsPoint: localPt) ifTrue: [selectedColor _ originalColor]. self updateContinuously: true. [Sensor anyButtonPressed] whileTrue: [self updateTargetColorWith: self indicateColorUnderMouse]. c _ self getColorFromKedamaWorldIfPossible: Sensor cursorPoint. c ifNotNil: [selectedColor _ c]. aHand newMouseFocus: nil; showTemporaryCursor: nil; flushEvents. self delete. ! !