Giter Site home page Giter Site logo

touchy.js's Issues

Host a demo please!!! :)

I want to see if this works; the demo is only in a downloadable zip file.

in order to try it with my iPad, I need to download it, upload it to my own host, then load up that url in my iPad. Can you set up a free hosting account somewhere to host the demo rather than just post it on github?

I can do this myself of course, but that means the next person has to do it too, and the next one....and the next one...

ad infinitum.

:)

Internet Explorer 8 incompatibility

Touchy is a great layer for implementing both touch (smartphones and tablets) and click (desktops) events in a webapp. I ran into a problem when testing a webapp of mine on Internet Explorer; the coordinates that the Touchy callback returns are 'undefined'.

Unfortunately Internet Explorer 8 and older versions still have a market share of over 20 percent, such a large group of users is hard to ignore. It would be great if Touchy supports Internet Explorer 8 as well!

Performance degradation on continuous unreleased touches

Problem:

After touching an activated element and constantly moving your finger without releasing for a minute or so, performance starts to degrade.

Cause:

Touchy stores data for a touches entire lifespan until it is released. So upon release from the screen memory is cleared and performance is once again normal.

Solution:

Simply don't store the entire touch lifespan and expose the data as it is generated so that developers can decide on their own wether or not they wish to store it.

feature idea/request: delegating events to a containerelement

Hi!

Binding Touchy.js on 40+ elements on iOS (iPhone 4) casues my webapps UI to hang for a few seconds. Using event delegation should speed things up.

    Touchy(element, callback(hand, finger) {} );

could become:

    Touchy(containerelement, cssSelector, callback(hand, finger, element) {} );

or something like

    Touchy(containerelement, cssSelector, callback(hand, finger) {
      // finger.element
    } );

consider mouseup when mouse leave an element

Hi,
when using the mouse:
mousedown starts triggering the move.
But if we leave the document without releasing the button, and release the button from outside the page, the page does not catch the release event, and when we come back to the element (with button released), the move are still triggered. This is quite confusing.
So, as a workaround, maybe you can cancel the move when mouse leaves an element.

Here is a quick patch I use to get a better behaviour

diff --git a/touchy.js b/touchy.js
index eee2f1e..75a4a62 100644
--- a/touchy.js
+++ b/touchy.js
@@ -386,6 +386,7 @@

    if ( this.handleMouse ) {
        bind(this.elem, 'mousedown' , this.mousedown() );
  •       bind(this.elem, 'mouseout'  , this.mouseup() );
        bind(this.elem, 'mouseup'   , this.mouseup()   );
        bind(this.elem, 'mousemove' , this.mousemove() );
    }
    

Touchend event not triggered

When I try to use Touchy on my Transformer Prime, the touchend event is never triggered, unless I only do a simple click-like touch. Once I move the finger, the touch never ends and the hand grows more and more fingers the more touchstart events I trigger.

Using mouse simulation my code works fine though.

I've tried initializing Touchy with

Touchy(touchField, true, {
    one: function(hand, finger){
        console.log(hand.fingers.length);
    }
});           

to make sure that only one finger is used but that won't help either. The hand grows more and more fingers with every new touchstart and never is a touchend event triggered.

Debugging on desktop

Hi, I was wondering if you had planed a way to test the App in the desktop? I.e. Faking the ipad movement with the mouse by holding keys or something? Thanks

error line 390

Hi,

on iPad, there is an error line 390 of touchy.js:

your code says:

this.fingers.splice(index, 1);

but this.fingers is undefined.

Instead, I wrote this:

mainHand.fingers.splice(index, 1);

and it solved the problem. But is it the right thing? And btw, why do you do a splice at this place?

Thanks for fixing this.

M.E.

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.