The Inbox: Morphic-ct.1616.mcz

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

The Inbox: Morphic-ct.1616.mcz

commits-2
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1616.mcz

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

Name: Morphic-ct.1616
Author: ct
Time: 10 January 2020, 9:18:04.681555 pm
UUID: 9b47b0c2-2b44-9647-9fc0-61b8ebaf053f
Ancestors: Morphic-mt.1615

Fixes a bug in NewBalloonMorph that leads to permanent flashing when the balloon is very high and does not fit to the left of the balloon.

Example to reproduce:

Morph new
        balloonText: 'Squeak is ' , (((1 to: 1000) gather: [:i | 'very ']) as: String) , ' cool';
        position: 10 @ 100;
        openInWorld.

=============== Diff against Morphic-mt.1615 ===============

Item was changed:
  ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category 'initialization') -----
  popUpAt: point forHand: aHand
  "Pop up the receiver as balloon help for the given hand"
 
+ #(bottomLeft topLeft bottomRight topRight)
+ detect: [:nextOrientation |
+ | pointWithOffset |
+ self orientation: nextOrientation.
+ pointWithOffset := point + self tailOffset.
+ self move: pointWithOffset.
+ self bounds: (self bounds translatedToBeWithin: aHand world bounds).
+ (self bounds perform: self orientation) = pointWithOffset]
+ ifNone: ["Keep last try."
+ "Avoid popping up under the cursor - this would make the receiver flash infinitely."
+ (self bounds containsPoint: aHand position)
+ ifTrue: [self left: aHand x + 1]].
- #(bottomLeft topLeft bottomRight topRight) detect: [:nextOrientation |
- | pointWithOffset |
- self orientation: nextOrientation.
- pointWithOffset := point + self tailOffset.
- self move: pointWithOffset.
- self bounds: (self bounds translatedToBeWithin: aHand world bounds).
- (self bounds perform: self orientation) = pointWithOffset] ifNone: ["Keep last try."].
 
  aHand world addMorphFront: self.
  aHand resetBalloonHelp: self.!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1616.mcz

Christoph Thiede

This is small enough to go into 5.3, or do you see any possible issues?


Best,
Christoph

Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Freitag, 10. Januar 2020 21:18:13
An: [hidden email]
Betreff: [squeak-dev] The Inbox: Morphic-ct.1616.mcz
 
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1616.mcz

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

Name: Morphic-ct.1616
Author: ct
Time: 10 January 2020, 9:18:04.681555 pm
UUID: 9b47b0c2-2b44-9647-9fc0-61b8ebaf053f
Ancestors: Morphic-mt.1615

Fixes a bug in NewBalloonMorph that leads to permanent flashing when the balloon is very high and does not fit to the left of the balloon.

Example to reproduce:

Morph new
        balloonText: 'Squeak is ' , (((1 to: 1000) gather: [:i | 'very ']) as: String) , ' cool';
        position: 10 @ 100;
        openInWorld.

=============== Diff against Morphic-mt.1615 ===============

Item was changed:
  ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category 'initialization') -----
  popUpAt: point forHand: aHand
         "Pop up the receiver as balloon help for the given hand"
 
+        #(bottomLeft topLeft bottomRight topRight)
+                detect: [:nextOrientation |
+                        | pointWithOffset |
+                        self orientation: nextOrientation.
+                        pointWithOffset := point + self tailOffset.
+                        self move: pointWithOffset.
+                        self bounds: (self bounds translatedToBeWithin: aHand world bounds).
+                        (self bounds perform: self orientation) = pointWithOffset]
+                ifNone: ["Keep last try."
+                        "Avoid popping up under the cursor - this would make the receiver flash infinitely."
+                        (self bounds containsPoint: aHand position)
+                                ifTrue: [self left: aHand x + 1]].
-        #(bottomLeft topLeft bottomRight topRight) detect: [:nextOrientation |
-                | pointWithOffset |
-                self orientation: nextOrientation.
-                pointWithOffset := point + self tailOffset.
-                self move: pointWithOffset.
-                self bounds: (self bounds translatedToBeWithin: aHand world bounds).
-                (self bounds perform: self orientation) = pointWithOffset] ifNone: ["Keep last try."].
                
         aHand world addMorphFront: self.
         aHand resetBalloonHelp: self.!




Carpe Squeak!