onzoom and onscroll

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

onzoom and onscroll

Benjamin Campin

Hi all,

 

With Squiggle 1.6,

 

When using the zoomin or zoomout button to zoom in a svg document or when zoomin using the ctrl+ (mouse),

both onzoomfunct and onscrollfunct are called.

 

<svg onzoom=”onzoomfunct(evt)” onscroll=”onscrollfunct(evt)” >

 

</svg>

 

Is there a way that onscrollfunct is not called when zoom-in or zoom-out in the document ?

 

Benjamin

 

 

Reply | Threaded
Open this post in threaded view
|

Re: onzoom and onscroll

thomas.deweese
Benjamin Campin wrote:

> When using the zoomin or zoomout button to zoom in a svg document or
> when zoomin using the ctrl+ (mouse),
>
> both onzoomfunct and onscrollfunct are called.

> Is there a way that onscrollfunct is not called when zoom-in or zoom-out
> in the document ?

    The zoom buttons zoom on the center of the image so there is
a scroll associated with them.  If you zoomed from the upper left
you would not get a scroll.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: onzoom and onscroll

Benjamin Campin
The point is that I would like only the onzoomfunct to be called when a user
zoom in the svg.

Benjamin

-----Original Message-----
From: Thomas DeWeese [mailto:[hidden email]]
Sent: May 6, 2005 1:53 PM
To: [hidden email]
Subject: Re: onzoom and onscroll

Benjamin Campin wrote:

> When using the zoomin or zoomout button to zoom in a svg document or
> when zoomin using the ctrl+ (mouse),
>
> both onzoomfunct and onscrollfunct are called.

> Is there a way that onscrollfunct is not called when zoom-in or zoom-out
> in the document ?

    The zoom buttons zoom on the center of the image so there is
a scroll associated with them.  If you zoomed from the upper left
you would not get a scroll.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: onzoom and onscroll

thomas.deweese
Benjamin Campin wrote:
> The point is that I would like only the onzoomfunct to be called when a user
> zoom in the svg.

    This would not be conformant to the SVG specification.
What you are calling a zoom operation is really a zoom and pan
operation.

    You could cache the screenCTM and skip the pan/zoom if
the current screenCTM matches the cached CTM (i.e. zoom/pan was
already called).

>
> Benjamin
>
> -----Original Message-----
> From: Thomas DeWeese [mailto:[hidden email]]
> Sent: May 6, 2005 1:53 PM
> To: [hidden email]
> Subject: Re: onzoom and onscroll
>
> Benjamin Campin wrote:
>
>
>>When using the zoomin or zoomout button to zoom in a svg document or
>>when zoomin using the ctrl+ (mouse),
>>
>>both onzoomfunct and onscrollfunct are called.
>
>
>>Is there a way that onscrollfunct is not called when zoom-in or zoom-out
>>in the document ?
>
>
>     The zoom buttons zoom on the center of the image so there is
> a scroll associated with them.  If you zoomed from the upper left
> you would not get a scroll.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: onzoom and onscroll

Benjamin Campin
Ok, I see, this is a good approach,

Thank you so much,


-----Original Message-----
From: Thomas DeWeese [mailto:[hidden email]]
Sent: May 6, 2005 2:20 PM
To: [hidden email]
Subject: Re: onzoom and onscroll

Benjamin Campin wrote:
> The point is that I would like only the onzoomfunct to be called when a
user
> zoom in the svg.

    This would not be conformant to the SVG specification.
What you are calling a zoom operation is really a zoom and pan
operation.

    You could cache the screenCTM and skip the pan/zoom if
the current screenCTM matches the cached CTM (i.e. zoom/pan was
already called).

>
> Benjamin
>
> -----Original Message-----
> From: Thomas DeWeese [mailto:[hidden email]]
> Sent: May 6, 2005 1:53 PM
> To: [hidden email]
> Subject: Re: onzoom and onscroll
>
> Benjamin Campin wrote:
>
>
>>When using the zoomin or zoomout button to zoom in a svg document or
>>when zoomin using the ctrl+ (mouse),
>>
>>both onzoomfunct and onscrollfunct are called.
>
>
>>Is there a way that onscrollfunct is not called when zoom-in or zoom-out
>>in the document ?
>
>
>     The zoom buttons zoom on the center of the image so there is
> a scroll associated with them.  If you zoomed from the upper left
> you would not get a scroll.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]