<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-12-14 2:19 GMT+01:00 tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><br>
&gt; On 12-12-2015, at 2:53 AM, karl ramberg &lt;<a href="mailto:karlramberg@gmail.com">karlramberg@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Dec 10, 2015 at 11:47 PM, tim Rowledge &lt;<a href="mailto:tim@rowledge.org">tim@rowledge.org</a>&gt; wrote:<br>
&gt; Has anybody used the #grabTransform message that is sent by HandMorph as part of picking up a Morph? Every use I can find of it seems to set it to an Identity transform and trying to use it for make my dragged morph appear half-size is not working in a very understandable manner.<br>
&gt;<br>
&gt; I think this is used for moving a morph that is transformed and also grabbing a duplicated morph that is transformed.<br>
<br>
</span>Actually it doesn’t seem to be; </blockquote><div><br></div><div>It makes a difference, if the visible position and orientation is a composition from multiple transformed morphs. <br></div><div>For example:<br><br>e:=EllipseMorph new .<br>e addMorphBack:StringMorph new.<br>e openInHand<br><br></div><div>Now <br></div><div>- show halo for ellipse morph<br></div><div>-  rotate the ellipse morph<br></div><div>- show halo for string morph<br></div><div>- rotate string morph<br></div><div>- grab or duplicate the string morph<br></div><div>-&gt; new string morphs transform automatically gets the combined transformation of the original string morph and the ellipse morph.<br><br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">a morph that has been rotated/scaled/etc by manipulating the halo gets a FlexMorph shell built around it and that is dragged and then when you drop the composite the flex shell is stripped away; which seems  pretty heavyweight way to do it to be honest.<br>
<span class=""><br>
&gt;<br>
&gt;<br>
&gt; HandMorph&gt;grabMorph:from: is the major player here; it asks the formerOwner for the grabTransform (without specifying for which grabbed morph, which seems odd) and uses that along withe formerOwner’s transform to do things to the grabbed morph. If I make my owner-morph implement grabTransform to return an identity transform, the grabbing works as normal. If I provide atransform that does any scaling (which is what I want to use) then<br>
&gt; a) the positions and offsets get all screwy<br>
&gt; b) dropping doesn’t work the same - you have to drop the morph and then click-release again to get it to actually drop. That part really confuses me right now.<br>
&gt;<br>
&gt; Maybe attachMorph: will work easier as you can do the trickery to the morph and just attach it to the hand ?<br>
<br>
</span>We can’t use attachMorph: since … oh wait, I see what you mean. I was about to say that grabbing the morph prevents us but of course the code is actually #startDrag: and we get to choose to use attach or grab. Yeah, that should work I guess, though I did some experiments with it before noticing the grabTransform stuff; you can get all sorts of surprises if you wrap your morph in a TransformationMorph and forget to unwrap it on drop.<br>
<br>
If nobody has any clue about what it was originally for, what it was ever used for or if any surviving code has a use for it then we should remove it (or rework it to do something helpful).<br>
<span class=""><br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
</span>Useful Latin Phrases:- Nihil curo de ista tua stulta superstitione = I&#39;m not interested in your dopey religious cult.<br>
<br>
<br>
<br>
</blockquote></div><br></div></div>