<div dir="ltr">Friendly bump to see if anyone has a lead on this one :)<div><br></div><div>Thanks in advance,</div><div>Nico PM</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 20, 2021 at 4:17 PM Nicolás Papagna Maldonado <<a href="mailto:nicolas.papagna@gmail.com">nicolas.papagna@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Aloha folks!<div><br></div><div>I've run into the following issue. I'll do my best to explain it with the following example.</div><div><br></div><div>TL;DR see video reproducing the issue here: <a href="https://drive.google.com/file/d/1HikB46LCob-bf-W4LOnT_azH-0ohlB9I/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1HikB46LCob-bf-W4LOnT_azH-0ohlB9I/view?usp=sharing</a></div><div><br></div><div>Let's say I want to display the class name of a morph when I point to it.</div><div>If I do this, everything works fine:</div><div><br></div><div>label := UpdatingLabelMorph new<br> target: [<br> self runningWorld submorphs</div><div> detect: [ :morph | morph containsGlobalPoint: self runningWorld activeHand morphPositionInWorld ]</div><div> ifFound: [ :morph | morph class name ]</div><div> ifNone: [ 'nothing here' ]</div><div> ];<br> getSelector: #value;<br> stepTime: 10.<br><br>self<br> runningWorld<br> activeHand<br> attachMorphBeside: label.<br><br>If I try to attach a morph that contains the label defined above (say I want to display something fancier, not just a label), then every time I drag the mouse the label behaves like a "pen" leaving traces of its old renders on the canvas:</div><div><br> self<br> runningWorld<br> activeHand<br> attachMorphBeside: (WidgetMorph new addMorph: label).<br> <br>My gut feeling is that this might be related to the fact that the WidgetMorph that contains the label is not aware that it is rendered outside of its bounds, but I don't have much experience with Morphic.</div><div><br></div><div>1) Am I doing something wrong/missing an important concept for understanding how Morphic works?</div><div>2) Related to that: I often find myself wrapping a bunch of morphs to add behavior/glue code to them, but that wrapper does not do any rendering. What would be the right way to adjust the wrapper's extent to fit its submorphs perfectly (e.g. no extra space/no clipping)?</div><div><br></div><div>Thanks in advance,</div><div>Nico PM</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><br>Nicolás Papagna</div>