Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

[dc-redux][android] Scrolling solution from master slows UI #123

Open
ssomnoremac opened this issue Aug 10, 2016 · 1 comment
Open

[dc-redux][android] Scrolling solution from master slows UI #123

ssomnoremac opened this issue Aug 10, 2016 · 1 comment

Comments

@ssomnoremac
Copy link

Per the wiki I've modified the dc-redux pan responder like so:

// also modified value of pan(value) to be  {x:0,y:0}

panListener(value) {
    let {
        leftOpen,
        rightOpen,
        scroll,
    } = this.state;

    var moveX = Math.abs(value.x) > Math.abs(value.y);
    if (this.props.scroll) {
        if (moveX) this.props.scroll(false);
        else this.props.scroll(true);
    }

but now the UI is super draggy. Any other solutions?

@ssomnoremac
Copy link
Author

ssomnoremac commented Aug 10, 2016

wow, all it took was this:

        onStartShouldSetPanResponder: () => false,
        onMoveShouldSetPanResponder: () => true,

although it's not perfect. I think a function for onMoveShouldSetPanResponder is probably in order but can it be implemented like the above listener?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant