Coder Social home page Coder Social logo

Comments (11)

ticlaudeberube avatar ticlaudeberube commented on July 17, 2024

It works when disabling Emulate Touchscreen in Chrome Canary Emulate panel. Added some meta tag to disable pinch.

Still not working on iPad.

from ui-layout.

ticlaudeberube avatar ticlaudeberube commented on July 17, 2024

lastX = mouseEvent[mouseProperty] || mouseEvent.originalEvent[mouseProperty];
Cannot read property 'clientY' of undefined

from ui-layout.

scottmcdonnell avatar scottmcdonnell commented on July 17, 2024

This fix worked for me for enabling touch on IOS

lastX = mouseEvent[mouseProperty] || mouseEvent.originalEvent[mouseProperty] || mouseEvent.originalEvent.targetTouches[0][mouseProperty];

from ui-layout.

ticlaudeberube avatar ticlaudeberube commented on July 17, 2024

Thanks, I will post my solution too. It should be similar.

I am very busy on another project. so i dodin't update my post yet.

There is another bug to document which happens when the handle bar is close
to the border of the window or 0.

Thanks again.

Claude

On Fri, May 9, 2014 at 12:57 PM, Scott McDonnell
[email protected]:

This fix worked for me for enabling touch on IOS

lastX = mouseEvent[mouseProperty] || mouseEvent.originalEvent[mouseProperty] || mouseEvent.originalEvent.targetTouches[0][mouseProperty];


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-42688637
.

Claude Bérubé, PMP, PSM
[email protected]
514-529-0338

http://clients.teksavvy.com/~cberube/

from ui-layout.

ticlaudeberube avatar ticlaudeberube commented on July 17, 2024

Here is the solution I have been working with for a couple of month. Also tested on IOS.
lastX = mouseEvent[mouseProperty] || mouseEvent.touches[0][mouseProperty];

from ui-layout.

ticlaudeberube avatar ticlaudeberube commented on July 17, 2024

Both solution have a similar bug that occurs when the slider is close to the edge on desktop.
Uncaught TypeError: Cannot read property 'clientX' of undefined
ui-layout.js:188

lastX = mouseEvent[mouseProperty] || mouseEvent.touches[0][mouseProperty]
mouseEvent.touches[0][mouseProperty]
TypeError: Cannot read property '0' of undefined
mouseEvent[mouseProperty]
45

lastX = mouseEvent[mouseProperty] || mouseEvent.originalEvent[mouseProperty] || mouseEvent.originalEvent.targetTouches[0][mouseProperty];

mouseEvent[mouseProperty]
16
mouseEvent.originalEvent[mouseProperty]
TypeError: Cannot read property 'clientX' of undefined
mouseEvent.originalEvent.targetTouches[0][mouseProperty]
TypeError: Cannot read property 'targetTouches' of undefined

Thanks,

from ui-layout.

scottmcdonnell avatar scottmcdonnell commented on July 17, 2024

This should cover everything:

 lastX = mouseEvent[mouseProperty] || mouseEvent.originalEvent[mouseProperty] || (mouseEvent.originalEvent.targetTouches ? mouseEvent.originalEvent.targetTouches[0][mouseProperty] : 0) || 0;

from ui-layout.

douglasduteil avatar douglasduteil commented on July 17, 2024

Thanks @scottmcdonnell @ticlaudeberube
I will make an update whenever i have time 👍

from ui-layout.

douglasduteil avatar douglasduteil commented on July 17, 2024

K It's actually this for me

lastX = 
  mouseEvent[mouseProperty] || 
  (mouseEvent.originalEvent && mouseEvent.originalEvent[mouseProperty]) || 
  (mouseEvent.targetTouches ? mouseEvent.targetTouches[0][mouseProperty] : 0) ||
   0;

from ui-layout.

ticlaudeberube avatar ticlaudeberube commented on July 17, 2024

Works AOK! thanks again. Hawsome UI component.

from ui-layout.

nevcos avatar nevcos commented on July 17, 2024

I think there is an error on ui-layout.js:112:

(mouseEvent.targetTouches ? mouseEvent.targetTouches[0][ctrl.sizeProperties.mouseProperty] : 0)

It's allways returning 0 because targetTouches only exists inside originalEvent. So this is working as expected:

(mouseEvent.originalEvent.targetTouches ? mouseEvent.originalEvent.targetTouches[0][ctrl.sizeProperties.mouseProperty] : 0)

from ui-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.