[squeak-dev] The Trunk: Morphic-mt.1382.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 21 08:59:47 UTC 2017


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1382.mcz

==================== Summary ====================

Name: Morphic-mt.1382
Author: mt
Time: 21 December 2017, 9:59:30.675674 am
UUID: 0c6a96d1-6bac-9848-bfa1-faced8611cb6
Ancestors: Morphic-mt.1381

Small fix considering text selection after text-drag cancel.

Try a different offset for drag-transfer morphs. Let's see if we can point the dragged morphs more easily now.

=============== Diff against Morphic-mt.1381 ===============

Item was changed:
  ----- Method: TextMorph>>startDrag: (in category 'event handling') -----
  startDrag: evt
  
+ 	self removeProperty: #waitingForTextDrag.
+ 
  	[evt hand grabMorph: (TransferMorph withPassenger: self selection from: self)]
  		ensure: [evt hand releaseMouseFocus: self].!

Item was changed:
  ----- Method: TextMorphForEditView>>acceptDroppingMorph:event: (in category 'dropping/grabbing') -----
  acceptDroppingMorph: aTransferMorph event: evt
  	"Accept a text to be inserted at the event/cursor position. Either remove or keep the source text depending on the transfer morph's copy state."
  	
- 	self removeProperty: #waitingForTextDrag.
- 	
  	self
  		handleInteraction: [
  			aTransferMorph shouldCopy
  				ifFalse: [(aTransferMorph source respondsTo: #editor)
  					ifTrue: [aTransferMorph source editor destructiveBackWord]].
  			self editor addText: aTransferMorph passenger asText event: evt]
  		fromEvent: evt.
  	
  	evt hand newKeyboardFocus: self.!

Item was changed:
  ----- Method: TransferMorph>>aboutToBeGrabbedBy: (in category 'dropping/grabbing') -----
  aboutToBeGrabbedBy: aHand 
  	"The receiver is being grabbed by a hand.                           
  	Perform necessary adjustments (if any) and return the actual morph    
  	     that should be added to the hand."
  	"Since this morph has been initialized automatically with bounds origin   
  	     0 at 0, we have to move it to aHand position."
  	super aboutToBeGrabbedBy: aHand.
  
+ 	self align: self fullBounds topLeft with: aHand position + (aHand extent // 3).
- 	self align: self fullBounds bottomLeft with: aHand position.
  	aHand newKeyboardFocus: self.!



More information about the Squeak-dev mailing list