<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Perfect! Thanks, Marcel! :-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Freitag, 3. April 2020 18:59:44<br>
<b>An:</b> John Pfersich via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] Morphic equivalent of 'display: none'?</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi!
<div><br>
</div>
<div>Yes, there is:</div>
<div><br>
</div>
<div>aMorph</div>
<div>   disableLayout: true;</div>
<div>   visible: false.</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 03.04.2020 17:48:29 schrieb Stéphane Rollandin <lecteur@zogotounga.net>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">> #show/#hide/#visible: reserve space for the hidden morph. However, there
<br>
> are other scenarios where you do not want to reserve space. (A simple <br>
> example would be a list that should only appear iff it has items.)<br>
<br>
You could have such a "removed morph" temporarily #become: a collapsed <br>
representation (like a flat invisible morph for a list item), and then <br>
swap it back when you need it. I have used that pattern; #become: is fast.<br>
<br>
> <br>
> In JS, you can use 'display: none' instead of 'visibility: hidden' to <br>
> give the space back to the element's remaining siblings.<br>
> <br>
> But in Morphic, is there currently any better option than #delete (and <br>
> #addMorph:) later?<br>
> <br>
> <br>
> (IMO, delete'n'add is not always the best pattern to do this. You <br>
> need to remember the index and owner of the relevant morph for adding it <br>
> later.)<br>
> <br>
> <br>
> Provided that I did not overlook any existing features, would you <br>
> consider this a useful extension for Morphic?<br>
<br>
No. I think this should be implemented either via specific mophs or via <br>
specific layout (probably yet to be invented).<br>
<br>
> <br>
> I was thinking of a property (#skipLayout, if you do not have any better <br>
> idea) and a convenience method (#nonSkippedSubmorphs) that <br>
> rejects suppressed submorphs. TableLayout would need to use this <br>
> selector instead of regular #submorphs.<br>
> <br>
> Or would this break too many existing things that rely on #submorphs?<br>
<br>
Oh, yes, please do not add any logic to #submorphs. It is a plain array <br>
and a lot of things rely on this. You can implement a wrapper Morph with <br>
all that logic, instead.<br>
<br>
> <br>
> <br>
> Another approach would be a selector in the TableLayoutProperties <br>
> to have all submorphs skipped that are hidden via classical #visible. <br>
> But this would be less powerful as you couldn't combine both kinds of <br>
> hiding in the same morph. But maybe this would be even better in terms <br>
> of avoiding complexity?<br>
<br>
Not a good idea IMO to use a property tag to represent another property. <br>
#visible should just be about visibility.<br>
<br>
Best,<br>
<br>
Stef<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>