[Cuis-dev] Morph render leftovers when dragging the mouse

Nicolás Papagna Maldonado nicolas.papagna at gmail.com
Thu Jul 29 07:56:20 PDT 2021


Thanks, Juan and Ken!

@Juan Vuletich <juan at jvuletich.org> I defined #submorphsMightProtrude to
answer true and it worked like a charm.

@KenD <ken.dickey at whidbey.com> I (believe) I did that when trying to fix
the bug, the challenge is how to shrink/wrap the parent morph whenever one
of the submorphs changes. To make it work I took a look at the "morph
lifecycle" and noticed that layoutSubmorphs is called before a morph is
drawn. I redefined layoutSubmorphs in the parent and after calling super I
compute the parent extent based on the submorphs to shrink/wrap. Its fine
working so far, but I bet there will be unhandled edge cases.

Cheers,
Nico PM



On Wed, Jul 28, 2021 at 12:28 PM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> On 7/27/2021 10:49 AM, ken.dickey--- via Cuis-dev wrote:
> > On 2021-07-26 19:01, Juan Vuletich via Cuis-dev wrote:
> > ..
> >> WRT your other question (I completely missed it earlier today), no.
> >> Cuis doesn't include "shrink wrap" morphs. I guess it shouldn't be
> >> difficult to implement it for your own morph. Cuis Layouts are based
> >> on the opposite idea: each morph decides the location and maybe
> >> extent of its submorphs.
> >
> > Note that implementing shrink wrap is darn easy.  Just use a
> > containing LayoutMorph and set its morphExtent to
> >    LayoutMorph>>minimumExtent
> >
> > FYI,
> > -KenD
>
> Great insight. Ken, you officially know more about Cuis Layouts than me!
>
> Thanks,
>
> --
> Juan Vuletich
> www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> @JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

Nicolás Papagna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210729/bb478878/attachment.htm>


More information about the Cuis-dev mailing list