Jump to content
Search Community

Mouse Pad Zoom Not Working

Robert May test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

The code below works flawless on my Dell Windows10 computer. I can use my mouse roller wheel or the mouse pad with no issues. The problem is with the techs laptops that I'm training, they use a Windows10 Dell rugged laptop and they don't use a mouse. Any ideas on why the mouse pad will not work on those laptops?  Mouse pad will zoom in other programs our techs use.

 

Thanks in advance.

 

 

function zoomSchematic(e){
    e.preventDefault();
    switch(e.detail>0) {
        case true:
        if(scaleUp > .5 ){
            scaleUp = scaleUp - .1;
            TweenMax.to(schematic, .5, {scaleX:scaleUp, scaleY:scaleUp, transformOrigin: "50% 50%", ease: Power0.easeNone});
        }
        break;
        case false:
        scaleUp = scaleUp + .1;
        TweenMax.to(schematic, .5, {scaleX:scaleUp, scaleY:scaleUp, transformOrigin: "50% 50%", ease: Power0.easeNone});
        break;
    }
}

Link to comment
Share on other sites

Hm, I'm not entirely familiar with that hardware, but I wonder if the problem has to do with differences in the events that the browser is dispatching. Have you tried to console.log() e and e.detail to make sure it's what you're expecting? Touch-based devices can be very different. You might want to read: 

 

https://www.html5rocks.com/en/mobile/touchandmouse/

https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events

  • Like 3
Link to comment
Share on other sites

19 hours ago, GreenSock said:

Hm, I'm not entirely familiar with that hardware, but I wonder if the problem has to do with differences in the events that the browser is dispatching. Have you tried to console.log() e and e.detail to make sure it's what you're expecting? Touch-based devices can be very different. You might want to read: 

 

https://www.html5rocks.com/en/mobile/touchandmouse/

https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events

Thank you so much Jack, it was the mouse pad itself. The scroll function on the mouse pad is on the far right side of the pad. Thanks again for your reply.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...