[Bug][PartialFix][Morphic][PasteUpMorph] Aligning to grid does not work!
hannes.hirzel.squeaklist at bluewin.ch
hannes.hirzel.squeaklist at bluewin.ch
Wed Mar 20 06:02:04 UTC 2002
Hi
Turning the grid on on the World PasteUpMorph seems not to generate any
effect.
- Try blue click on the desktop
--> The WorldMorph gets halos
- Choose menu / playfield options...
--> the playfiled options menu shows up
- Choose 'keep this menu up'
- choose 'set grid spacing'
- choose 'turn gridding on'
A partial fix which works for me at the moment is to change the method
#handleDropMorph: anEvent
of class Morph with to the following change; my changes are marked with
"HJH"
handleDropMorph: anEvent
"Handle a dropping morph."
| aMorph localPt diff |
aMorph _ anEvent contents.
"Do a symmetric check if both morphs like each other"
((self wantsDroppedMorph: aMorph event: anEvent) "I want her"
and: [aMorph wantsToBeDroppedInto: self]) "she wants me"
ifFalse: [aMorph removeProperty: #undoGrabCommand.
^ self].
anEvent wasHandled: true.
"Transform the morph into the receiver's coordinate frame. This is
currently incomplete since it only takes the offset into account where
it really should take the entire transform."
localPt _ (self transformedFrom: anEvent hand world) "full transform
down"
globalPointToLocal: aMorph referencePosition.
diff _ aMorph topLeft \\ 20. "HJH"
localPt _ localPt - diff. "HJH"
aMorph referencePosition: localPt.
self acceptDroppingMorph: aMorph event: anEvent.
aMorph justDroppedInto: self event: anEvent.
Hannes Hirzel
More information about the Squeak-dev
mailing list
|