The Inbox: Morphic-ct.1770.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Morphic-ct.1770.mcz

commits-2
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1770.mcz

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

Name: Morphic-ct.1770
Author: ct
Time: 8 May 2021, 7:21:55.77561 pm
UUID: 7a38a5a2-11a9-8748-ba2f-e0905097cc81
Ancestors: Morphic-mt.1767

Proposal: When attaching multiple morphs to the hand, position them with a small convergent distance in order to improve their visibility. In this way, the user realizes that there have been opened multiple morphs, but plenty opened morphs don't run the risk of leaving the screen.

https://www.wolframalpha.com/input/?i=lim+n-%3Einf+100%281-exp%28-n%2F2%29%29

Note that, in general, I would consider attaching multiple morphs to the hand an anti-pattern from the UX perspective. Nevertheless, there are some situations where we already do this at the moment, for instance when browsing an ambivalent identifier conventionally (i.e. with the #alternativeBrowseIt preference being disabed).

=============== Diff against Morphic-mt.1767 ===============

Item was changed:
  ----- Method: HandMorph>>attachMorph: (in category 'grabbing/dropping') -----
+ attachMorph: aMorph
- attachMorph: m
  "Position the center of the given morph under this hand, then grab it.
  This method is used to grab far away or newly created morphs."
+
  | delta |
  self releaseMouseFocus. "Break focus"
  self showTemporaryCursor: nil.
+ delta := aMorph bounds extent // 2.
+ aMorph
+ position: self position - delta + (self offsetForNextAttachee: aMorph);
+ formerPosition: aMorph position.
+ targetOffset := aMorph position - self position.
+ self addMorphBack: aMorph.!
- delta := m bounds extent // 2.
- m position: (self position - delta).
- m formerPosition: m position.
- targetOffset := m position - self position.
- self addMorphBack: m.!

Item was added:
+ ----- Method: HandMorph>>offsetForNextAttachee: (in category 'grabbing/dropping') -----
+ offsetForNextAttachee: aMorph
+ ^ 100 asPoint * (1 - (self submorphCount negated / 2) exp)!