Skip to content

Cannot use touchmove #846

Open
Open
@easilyBaffled

Description

@easilyBaffled

I am working on a project that needs to work both in desktop and mobile browsers.
Part of the interaction is that you create a path of nodes by pressing on one to start then dragging to others to add them to the path.
I am using

node.on( ('ontouchmove' in window) ? 'touchmove' : 'mouseover', e => {
                    console.log('MOVING');
                    e.preventDefault();
                    if ( pathBuilding )  {
                        if ( !path.includes( [ node.x, node.y ] ) ) {
                            path.push( [ node.x, node.y ] );
                            node.setState( { selected: true } );
                        }
                    }
                } );

To handle the second part where you add subsequent nodes to the path. This works on on the desktop, but nothing is triggered on iOS Safari or iOS Chrome.

I have set createjs.Touch.enable(stage); stage.enableMouseOver(20); and my mousedown and touchend work. I have seen rollover in a few places, but that hasn't helped, and I know there is a pressmove but that would only contain the information about the node I pressed on, and not the ones I am moving over.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions