Julien,<br><br>Thanks so much for the example code.&nbsp; I took what you gave me and deployed it to my local LPS and the zooming worked awesome.&nbsp; It&#39;s cool that it will zoom every child element in the parent view.<br><br>Thank again for this solution.
<br>- Anthony<br><br><div class="gmail_quote">On Jan 5, 2008 1:34 PM, Julien Lépine &lt;<a href="mailto:julien.lepine@free.fr">julien.lepine@free.fr</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">










<div link="blue" vlink="blue" lang="FR">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Hi Anthony,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Basically you create a transparent image
the size of your parent view not zoomed. (for simplicity say we have a
100x100px transparent png file). </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Attached you will find a zip containing a 100x100px
png file, a small png file with content, and a lzx test case for presenting
what zooming looks like.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">The main principles are&nbsp;:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Get the parent view with stretches=&quot;both&quot;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Define an attribute called &quot;zoomfactor&quot;.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Bind the width and height of the parent
view to the basewidth and baseheight custom attributes multiplied by the zoom factor
(height and width can be the bound to the size of the inner view).</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Define an inner view, that will take the
full width and height of the parent view without the zoom factor.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">---CODE</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&lt;canvas debug=&quot;false&quot;
proxied=&quot;false&quot; width=&quot;300&quot; height=&quot;300&quot;&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp; &lt;simplelayout axis=&quot;y&quot;
inset=&quot;10&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp; &lt;resource
name=&quot;zoomresource&quot; src=&quot;background-fill.png&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp; &lt;slider width=&quot;200&quot;
align=&quot;center&quot; minvalue=&quot;50&quot; maxvalue=&quot;300&quot;
value=&quot;100&quot;&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;handler
name=&quot;onvalue&quot;&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;![CDATA[</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // access via zoomable
because it is at the canvas level.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
zoomable.setAttribute(&quot;zoomfactor&quot;, (0.0 + this.value) / 100.0);</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]]&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/handler&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp; &lt;/slider&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp; &lt;view name=&quot;zoomable&quot;
resource=&quot;zoomresource&quot; stretches=&quot;both&quot;
align=&quot;center&quot;&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attribute
name=&quot;zoomfactor&quot; type=&quot;number&quot; value=&quot;1.0&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attribute
name=&quot;baseheight&quot; type=&quot;number&quot;
value=&quot;100.0&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attribute
name=&quot;basewidth&quot; type=&quot;number&quot; value=&quot;100.0&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attribute
name=&quot;height&quot; value=&quot;${this.baseheight *
this.zoomfactor}&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attribute name=&quot;width&quot;
value=&quot;${this.basewidth * this.zoomfactor}&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;view
height=&quot;${parent.baseheight}&quot; width=&quot;${parent.basewidth}&quot;
clip=&quot;true&quot;&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;view width=&quot;20&quot;
height=&quot;20&quot; bgcolor=&quot;red&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;view
align=&quot;right&quot; width=&quot;20&quot; height=&quot;20&quot; bgcolor=&quot;green&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;view
align=&quot;left&quot; valign=&quot;bottom&quot;
resource=&quot;http:content.png&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;text
resize=&quot;true&quot; align=&quot;center&quot; y=&quot;35&quot;
text=&quot;${&#39;Inner : &#39; + parent.height + &#39;x&#39; + parent.width }&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;text
resize=&quot;true&quot; align=&quot;center&quot; y=&quot;50&quot;
text=&quot;${&#39;Outer : &#39; + zoomable.height + &#39;x&#39; + zoomable.width }&quot;/&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/view&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;&nbsp;&nbsp; &lt;/view&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&lt;/canvas&gt;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">---CODE</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Get anything you want inside this inner
view, it will be zoomed like a charm.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Note, for pngs files to load at run time
instead of compile time, you have to be in swf8 mode (this is just for the
small image inside).</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Cheers,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Julien</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">De&nbsp;:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Anthony Bargnesi
[mailto:<a href="mailto:abargnesi@gmail.com" target="_blank">abargnesi@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Envoyé&nbsp;:</span></b> samedi 5 janvier
2008 17:18<br>
<b><span style="font-weight: bold;">À&nbsp;:</span></b> Julien Lépine<br>
<b><span style="font-weight: bold;">Cc&nbsp;:</span></b>
<a href="mailto:laszlo-user@openlaszlo.org" target="_blank">laszlo-user@openlaszlo.org</a><br>
<b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [Laszlo-user] Is
zooming in on views possible?</span></font></p>

</div><div><div></div><div class="Wj3C7c">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Julien,<br>
<br>
Thanks for the info, it sounds like that might achieve the affect I
wanted.&nbsp; In order to get a better understanding of what you&#39;re saying, how
would that look in the laszlo code?&nbsp; I&#39;m not sure what you mean by
transparent resource and what you would have to declare on the child views
within the parent. <br>
<br>
Thanks again.<br>
- Anthony</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Jan 5, 2008 5:51 AM, Julien Lépine &lt;<a href="mailto:julien.lepine@free.fr" target="_blank">julien.lepine@free.fr</a>&gt; wrote:</span></font></p>


<div link="blue" vlink="purple">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Hi Anthony,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">You can first try playing with a view that would have
stretches=&quot;both&quot; defined (for the parent view, and that would have a
transparent resource the initial size of that view).</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">When you will change the size of that view, it will zoom on
the resource, and on the side effect (or maybe a desired one, but the fact is
that it happens), all the child views will be zoomed along.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">So I guess this can achieve the effect you want.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">++</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Julien</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">De&nbsp;:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> <a href="mailto:laszlo-user-bounces@openlaszlo.org" target="_blank">
laszlo-user-bounces@openlaszlo.org</a>
[mailto:<a href="mailto:laszlo-user-bounces@openlaszlo.org" target="_blank">laszlo-user-bounces@openlaszlo.org</a>]
<b><span style="font-weight: bold;">De la part de</span></b> Anthony Bargnesi<br>
<b><span style="font-weight: bold;">Envoyé&nbsp;:</span></b> samedi 5 janvier
2008 06:51<br>
<b><span style="font-weight: bold;">À&nbsp;:</span></b> <a href="mailto:laszlo-user@openlaszlo.org" target="_blank">laszlo-user@openlaszlo.org</a><br>
<b><span style="font-weight: bold;">Objet&nbsp;:</span></b> [Laszlo-user] Is
zooming in on views possible?</span></font></p>

</div>

<div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p><font face="Arial" size="3"><span style="font-size: 12pt; font-family: Arial;">I
was wondering if I have a parent view that has child views that can be moved
around, can I zoom in on the parent view and have the children resize with
it?&nbsp; I would like it to work similarly to how something like GoogleMaps
works. <br>
<br>
It could certainly be possible to accomplish this by resizing the individual
child views based on the zoom levels, but I was just curious if openlaszlo
supported this out of the box.&nbsp; Any direction would certainly help at this
point. <br>
<br>
Thanks,<br>
Anthony</span></font></p>

</div>

</div>

</div>

</div>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div></div></div>

</div>


</blockquote></div><br>