Giter Club home page Giter Club logo

Comments (11)

fljot avatar fljot commented on September 2, 2024

First of all let's ensure we're talking about the same version, so go and grab the sources from this commit
4398712

from gestouch.

zenrobin avatar zenrobin commented on September 2, 2024

Thanks for the quick reply!

I switched from the swc to the latest src, and then merged in your two changes from 4398712.

Sadly, I still see fail states. Here is how I'm detecting them:

    public function onSCMouseMove(event:GestureEvent):void {
        trace("[SceneStage] onSCMouseMove:", event.oldState + "->" + event.newState);
        if (event.oldState == GestureState.FAILED)
        {
            trace("[SceneStage] onSCMouseMove() - Gesture state: FAIL");  
        }

Some output:

[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.IDLE
[SceneStage] onSCMouseMove: GestureState.IDLE->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
[SceneStage] onSCMouseMove: GestureState.BEGAN->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.IDLE
[SceneStage] onSCMouseMove: GestureState.IDLE->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.FAILED
[SceneStage] onSCMouseMove: GestureState.FAILED->GestureState.IDLE
[SceneStage] onSCMouseMove() - Gesture state: FAIL

from gestouch.

fljot avatar fljot commented on September 2, 2024

Check the project settings again because there's no more IDLE anymore.
https://github.com/fljot/Gestouch/blob/4398712f0c5b704818457bf120193157bd09dfdb/src/org/gestouch/core/GestureState.as

from gestouch.

fljot avatar fljot commented on September 2, 2024

So, with the recent version, show me the stacktrace once it fails:

if (event.newState == GestureState.FAILED)
{
    trace("failed:", (new Error()).getStackTrace());
}

and did I get you right — it fails while you're moving?

from gestouch.

zenrobin avatar zenrobin commented on September 2, 2024

Found the "develop" branch and I'm now using that -- master still has idle for me for some reason.

Also found that I needed to convert to GESTURE_RECOGNIZED in a few cases where I was using something else. Seems like you cleaned some things up, and I wasn't getting a location coordinate for the event state I was previously using.

Onward:
Here is the behavior I'm using to repro:

click -> release // (to select an object to transform)
clickhold ->drag ->release // moves an object
clickhold ->drag ->release // move here
clickhold ->drag ->release // move there
clickhold ->drag ->release // move somewhere else
clickhold ->drag // FAIL

The fail happens before the move -- the object stays put / the cursor moves without it.

Here's the latest trace with your code:

[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
[SceneStage] onSCMouseMove: GestureState.BEGAN->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN
[SceneStage] onSCMouseMove: GestureState.BEGAN->GestureState.CHANGED
[SceneStage] onSCMouseMove: GestureState.CHANGED->GestureState.ENDED
[SceneStage] onSCMouseMove: GestureState.ENDED->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.FAILED
failed: Error
at com.storytime.creator::SceneStage/onSCMouseMove()[client\src\com\storytime\creator\SceneStage.as:745]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.gestouch.gestures::Gesture/setState()[client\src\org\gestouch\gestures\Gesture.as:577]
at org.gestouch.gestures::Gesture/org.gestouch.core::gestouch_internal::setState_internal()[client\src\org\gestouch\gestures\Gesture.as:598]
at org.gestouch.core::GesturesManager/org.gestouch.core::gestouch_internal::onGestureRecognized()[client\src\org\gestouch\core\GesturesManager.as:186]
at org.gestouch.gestures::Gesture/setState()[client\src\org\gestouch\gestures\Gesture.as:589]
at org.gestouch.gestures::SwipeGesture/onTouchMove()[client\src\org\gestouch\gestures\SwipeGesture.as:241]
at org.gestouch.gestures::Gesture/org.gestouch.core::gestouch_internal::touchMoveHandler()[client\src\org\gestouch\gestures\Gesture.as:657]
at org.gestouch.core::GesturesManager/org.gestouch.core::gestouch_internal::onTouchMove()[client\src\org\gestouch\core\GesturesManager.as:284]
at org.gestouch.core::TouchesManager/org.gestouch.core::gestouch_internal::onTouchMove()[client\src\org\gestouch\core\TouchesManager.as:170]
at org.gestouch.input::NativeInputAdapter/mouseMoveHandler()[client\src\org\gestouch\input\NativeInputAdapter.as:205]
[SceneStage] onSCMouseMove: GestureState.FAILED->GestureState.POSSIBLE
[SceneStage] onSCMouseMove: GestureState.POSSIBLE->GestureState.BEGAN

While still seemingly random, the fail state happens quite easily in my case. I'd be happy to skype-screen-share with you to show you first hand if that helps.

Thanks for your support. :)

from gestouch.

fljot avatar fljot commented on September 2, 2024

Well the log says that:

  1. First you stop TransformGesture (dragging) via releasing the touch.
  2. Then you attempt to do it (pan/transform) again, but another gesture (Swipe) is recognized therefore your TransformGesture fails.

my skype is fljot_

from gestouch.

zenrobin avatar zenrobin commented on September 2, 2024

Ugh - good call. I had a swipe gesture in there from an old test that was interfering. Thanks so much for helping to troubleshoot that.

Question - should I go back to the gestouch swc I was using, or do you think it's best to stay with the dev branch?

from gestouch.

fljot avatar fljot commented on September 2, 2024

I'd say this commit from develop branch has nothing experimental and I should actually make a release out of it or maybe a bit later.. so I'd say go with it.

But for me it's still a bit unclear how would swipe be recognized first.. only if it was deeper than transform?

from gestouch.

zenrobin avatar zenrobin commented on September 2, 2024

Yes - swipe was initialized after the transform was initialized. Is it more standard to do it before?

I think I'm having a similar issue with double-tap -- the transform is listened to first, so it makes it more difficult to successfully make a double-tap happen.

Thanks again for your support here.

from gestouch.

fljot avatar fljot commented on September 2, 2024

Transform and double-tap should not conflict due to different nature — you don't move your finger (much) when tapping. Well you have my skype.. because it sounds a bit weird what you say)

from gestouch.

zenrobin avatar zenrobin commented on September 2, 2024

It's pretty sensitive on my ipad3 -- difficult to get my double-tap context menu to show without moving the object via the Transform Gesture. I was thinking about doing some "this cancels that" logic, but I'm not at that point yet. I added you on skype -- would be happy to show you the repro :)

from gestouch.

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.