Loading ...
Sorry, an error occurred while loading the content.

Re: mousewheel event

Expand Messages
  • meikelneu
    ... Thanks, Holger, I really couldn t find this even after a significant amount of googling. There seems to be some discussion with regard to DOM3 about
    Message 1 of 15 , Aug 1, 2006
    • 0 Attachment
      --- In svg-developers@yahoogroups.com, Holger Will <holger@...> wrote:
      >
      > in mozilla its evt.detail , but dont ask me about the values returned.
      > the only thing i know is if you scroll up its a positive value, if you
      > scroll down its negative.

      Thanks, Holger, I really couldn't find this even after a significant
      amount of googling. There seems to be some discussion with regard to
      DOM3 about wheelDelta

      as for the values returned it seems to be device dependent:

      using a Microsoft Mouse on WinXP I got the value 3 for each increment
      of the mousewheel (the Microsoft wheel has notches) and it turns out
      that in the Mouse Control Panel (System Preferences) the wheel
      settings were to "move 3 lines per increment". And indeed, changing
      this value was identically reflected in "evt.detail"

      Using an Apple Trackpad with scroll functionality (two fingers at
      once) resulted in different values but always integers. I expect
      similar results with devices like the Apple Mighty Mouse that doesn't
      have increments/ notches.

      Michael
    • Holger Will
      ... Hi Michael ... thanks a lot, thats some useful information there. i cant wait to see this specified, and usable in more browsers. cheers Holger -- if this
      Message 2 of 15 , Aug 1, 2006
      • 0 Attachment
        >

        Hi Michael

        >>using a Microsoft Mouse on WinXP I got the value 3 for each increment
        >>of the mousewheel (the Microsoft wheel has notches) and it turns out
        >>that in the Mouse Control Panel (System Preferences) the wheel
        >>settings were to "move 3 lines per increment". And indeed, changing
        >>this value was identically reflected in "evt.detail"

        thanks a lot, thats some useful information there. i cant wait to see
        this specified, and
        usable in more browsers.

        cheers
        Holger

        --
        if this information was useful, please try to help someone else !
        My Private Homepage: http://www.treebuilder.de
        My Companys Website: http://www.klimapartner-berlin.de
      • xof
        Hi, Here is a working example of using the mousewheel event in IE + ASV6 (can’t remember if it works in ASV3). The svg file is called from an embed element
        Message 3 of 15 , Aug 1, 2006
        • 0 Attachment
          Hi,

          Here is a working example of using the mousewheel event in IE + ASV6 (can’t
          remember if it works in ASV3). The svg file is called from an embed element
          and this may not be what you need.

          http://www.geoloc.org/app/CITYFINDER/

          An onmousewheel attribute is placed in the embed element:

          <embed onmousewheel="myMapController.doOnMouseWheel()" type="image/svg+xml"
          src="map.svg" ...></embed


          In myMapController:

          this.doOnMouseWheel = function(){
          if (event.wheelDelta >= 120){
          this.playZoomSound('-');
          if(this.vbM) this.vbM.zoomOut();
          }else if (event.wheelDelta <= -120){
          this.playZoomSound('+');
          if(this.vbM) this.vbM.zoomIn();
          }
          }

          From where comes this magic number 120 ?
          I can't remember, the code almost 3 years old, but it seems to work fine.


          Cheers

          Christophe

          ________________________________________
          From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
          On Behalf Of Holger Will
          Sent: mardi 1 août 2006 17:21
          To: svg-developers@yahoogroups.com
          Subject: Re: [svg-developers] Re: mousewheel event

          >

          Hi Michael

          >>using a Microsoft Mouse on WinXP I got the value 3 for each increment
          >>of the mousewheel (the Microsoft wheel has notches) and it turns out
          >>that in the Mouse Control Panel (System Preferences) the wheel
          >>settings were to "move 3 lines per increment". And indeed, changing
          >>this value was identically reflected in "evt.detail"

          thanks a lot, thats some useful information there. i cant wait to see
          this specified, and
          usable in more browsers.

          cheers
          Holger
        • Doug Schepers
          Hi, Holger- ... Mousewheel events are specified in the latest draft of the SVG Tiny 1.2 spec (which will hopefully be a Candidate Recommendation soon). There
          Message 4 of 15 , Aug 1, 2006
          • 0 Attachment
            Hi, Holger-

            Holger Will wrote:
            |
            | i cant wait to see this specified, and usable in more browsers.

            Mousewheel events are specified in the latest draft of the SVG Tiny 1.2 spec
            (which will hopefully be a Candidate Recommendation soon). There is also
            work on them for the WebAPI Working Group's DOM3 specification, and if they
            meet the needs of SVG, the SVG spec will drop them in favor of the more
            language-neutral DOM3 version.

            So no matter what, there will be a specified mousewheel event soon, and I
            imagine that most browsers will support it.

            Regards-
            Doug
          • meikelneu
            Yep, this one works with ASV3 and ie6 The question is: For how long? Since the Eolas patent thing ie6 is soon to change the way it handles plugin content via
            Message 5 of 15 , Aug 2, 2006
            • 0 Attachment
              Yep, this one works with ASV3 and ie6

              The question is: For how long?

              Since the Eolas patent thing ie6 is soon to change the way it handles
              plugin content via the embed tag ...


              --- In svg-developers@yahoogroups.com, "xof" <xofm1@...> wrote:
              >
              > Hi,
              >
              > Here is a working example of using the mousewheel event in IE + ASV6
              (can�t
              > remember if it works in ASV3). The svg file is called from an embed
              element
              > and this may not be what you need.
              >
              > http://www.geoloc.org/app/CITYFINDER/
              >
              > An onmousewheel attribute is placed in the embed element:
              >
              > <embed onmousewheel="myMapController.doOnMouseWheel()"
              type="image/svg+xml"
              > src="map.svg" ...></embed
              >
              >
              > In myMapController:
              >
              > this.doOnMouseWheel = function(){
              > if (event.wheelDelta >= 120){
              > this.playZoomSound('-');
              > if(this.vbM) this.vbM.zoomOut();
              > }else if (event.wheelDelta <= -120){
              > this.playZoomSound('+');
              > if(this.vbM) this.vbM.zoomIn();
              > }
              > }
              >
              > From where comes this magic number 120 ?
              > I can't remember, the code almost 3 years old, but it seems to work
              fine.
              >
              >
              > Cheers
              >
              > Christophe
              >
              > ________________________________________
              > From: svg-developers@yahoogroups.com
              [mailto:svg-developers@yahoogroups.com]
              > On Behalf Of Holger Will
              > Sent: mardi 1 ao�t 2006 17:21
              > To: svg-developers@yahoogroups.com
              > Subject: Re: [svg-developers] Re: mousewheel event
              >
              > >
              >
              > Hi Michael
              >
              > >>using a Microsoft Mouse on WinXP I got the value 3 for each increment
              > >>of the mousewheel (the Microsoft wheel has notches) and it turns out
              > >>that in the Mouse Control Panel (System Preferences) the wheel
              > >>settings were to "move 3 lines per increment". And indeed, changing
              > >>this value was identically reflected in "evt.detail"
              >
              > thanks a lot, thats some useful information there. i cant wait to see
              > this specified, and
              > usable in more browsers.
              >
              > cheers
              > Holger
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.