'From etoys3.0 of 21 February 2008 [latest update: #1963] on 13 April 2008 at 2:21:20 am'! "Change Set: gridOnDrop-sw Date: 13 April 2008 Author: Scott Wallace Picks up on Karl Ramberg's effort to restore some of the lost functionality of pasteUpMorph 'gridding'. If a morph is dropped into a paste-up-morph in which gridding is in effect, the paste-up-morph will now grid the morph's position upon acceptance of the drop."! !PasteUpMorph methodsFor: 'dropping/grabbing' stamp: 'sw 4/13/2008 02:03'! acceptDroppingMorph: dropped event: evt "The supplied morph, known to be acceptable to the receiver, is now to be assimilated; the precipitating event is supplied" | mm tfm aMorph | aMorph _ self morphToDropFrom: dropped. self isWorldMorph ifTrue:["Add the given morph to this world and start stepping it if it wants to be." self addMorphFront: aMorph. (aMorph fullBounds intersects: self viewBox) ifFalse: [Beeper beep. aMorph position: self bounds center]] ifFalse:[super acceptDroppingMorph: aMorph event: evt]. self griddingOn ifTrue: [aMorph position: (self gridPoint: aMorph position)]. aMorph submorphsDo: [:m | (m isKindOf: HaloMorph) ifTrue: [m delete]]. aMorph allMorphsDo: "Establish any penDown morphs in new world" [:m | m player ifNotNil: [m player getPenDown ifTrue: [((mm _ m player costume) notNil and: [(tfm _ mm owner transformFrom: self) notNil]) ifTrue: [self noteNewLocation: (tfm localPointToGlobal: mm referencePosition) forPlayer: m player]]]]. self isPartsBin ifTrue: [aMorph isPartsDonor: true. aMorph stopSteppingSelfAndSubmorphs. aMorph suspendEventHandler] ifFalse: [self world startSteppingSubmorphsOf: aMorph]. self presenter morph: aMorph droppedIntoPasteUpMorph: self. self showingListView ifTrue: [self sortSubmorphsBy: (self valueOfProperty: #sortOrder). self currentWorld abandonAllHalos]! !