Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swipe-to-advance on iOS? #19

Open
patricioPanichelli opened this issue Jun 11, 2015 · 9 comments
Open

Support swipe-to-advance on iOS? #19

patricioPanichelli opened this issue Jun 11, 2015 · 9 comments

Comments

@patricioPanichelli
Copy link

I just tried Stack, and it's great. Congratulations. I've been using D3 for a while, and even though Stack is a minor thing next to D3, well... it is still great.

It is not a big issue for me, as most of my traffic is from desktop. But I was wondering if there is a quick workaround to make Stack work on iPad / iPhone.

Thanks

@mbostock
Copy link
Owner

What do you mean by “work”? It should just work out of the box:

screen shot 2015-06-11 at 7 04 08 pm

It doesn’t use swiping, though—just normal scrolling.

@patricioPanichelli
Copy link
Author

I agree that it works, but that is not how it works (i.e. behaves) on desktop. I was not descriptive enough, I'm sorry. What I was asking about was the swiping behaviour you see on desktop, as you correctly guessed.

Had to ask, perhaps I was missing some configuration or similar to get it going. Thanks for the reply.

@mbostock mbostock changed the title Any recommendations on how to make Stack work on iPad/iPhone? Support swipe-to-advance on iOS? Jun 12, 2015
@mbostock
Copy link
Owner

I’ve updated description. This would be a nice feature, but it’s somewhat of a pain to implement page swiping on iOS.

@alemieux3
Copy link

Sorry to intrude on the conversation, but I'm trying to use stack.js now on
a project and it kinda works out of the box?!? What I mean is if I add
jQuery and the stack.js library to my page and I have it formatted with

tags, it should just work, but it doesn't seem to. In your code example, there's some additional JS functions at the bottom of the page. Without that, stack.js doesn't seem to just work out of the box.

I want the simplest implementation of stack. Do I need to write a function
for that? There's also the follow id and the follow-anchor? I'm not sure
what that does. The most confusing thing in the example is the lorenz code.
I'm assuming this code just waits until the animation is complete before
scrolling forward?

On Fri, Jun 12, 2015 at 12:39 AM, patricioPanichelli <
[email protected]> wrote:

I agree that it works, but that is not how it works (i.e. behaves) on
desktop. I was not descriptive enough, I'm sorry. What I was asking about
was the swiping behaviour you see on desktop, as you correctly guessed.

Had to ask, perhaps I was missing some configuration or similar to get it
going. Thanks for the reply.


Reply to this email directly or view it on GitHub
#19 (comment).

Al Lemieux
90 Currier Rd
Pelham, NH 03076
www.lemieux-design.net
[email protected]

@mbostock
Copy link
Owner

The only thing you need to do to get stack working is:

  1. Load d3.js.
  2. Load stack.js.
  3. Call the stack() function.

If you copied some of the other code from the example and deleted other parts I you may have broken something. That example demonstrates some more advanced features like using listeners to trigger behaviors such as animations. However, I can’t identify the problem without looking at your code.

@alemieux3
Copy link

Mike,

How do you have a slide wait for animations to complete before moving
forward? I'm using the greensock animation library. I'd like to have a
slide appear, then do all of my tweens. Is that what activate is for?

On Fri, Jun 12, 2015 at 11:50 AM, Mike Bostock [email protected]
wrote:

The only thing you need to do to get stack working is:

  1. Load d3.js.
  2. Load stack.js.
  3. Call the stack() function.

If you copied some of the other code from the example
https://mbostock.github.io/stack/ and deleted other parts I you may
have broken something. That example demonstrates some more advanced
features like using listeners to trigger behaviors such as animations.
However, I can’t identify the problem without looking at your code.


Reply to this email directly or view it on GitHub
#19 (comment).

Al Lemieux
90 Currier Rd
Pelham, NH 03076
www.lemieux-design.net
[email protected]

@alemieux3
Copy link

Here's the link:
http://www.affinnova.com/breakthrough-innovation/stack-test.html

On Fri, Jun 12, 2015 at 11:50 AM, Mike Bostock [email protected]
wrote:

The only thing you need to do to get stack working is:

  1. Load d3.js.
  2. Load stack.js.
  3. Call the stack() function.

If you copied some of the other code from the example
https://mbostock.github.io/stack/ and deleted other parts I you may
have broken something. That example demonstrates some more advanced
features like using listeners to trigger behaviors such as animations.
However, I can’t identify the problem without looking at your code.


Reply to this email directly or view it on GitHub
#19 (comment).

Al Lemieux
90 Currier Rd
Pelham, NH 03076
www.lemieux-design.net
[email protected]

@mbostock
Copy link
Owner

That’s a heavily modified version of Stack.js… it’s barely recognizable. Did you make those modifications and are asking me to help, or are you using someone else’s fork? In either case, I don’t think I can help because it goes too far beyond the original design and intent of this library. In particular, it uses scrolljacking to snap to slide boundaries, which goes against one of the primary motivations of this library. (See my How To Scroll essay for more.)

I’d be okay with supporting swipe-to-advance on iOS, but that’s only because you can tell when the fingers are touching the input device and thus reliably discern swipe gestures. That’s not true on desktop.

@alemieux3
Copy link

Mike,

I figured it out. Must be someone's fork. I grabbed the code from another
site.

Thanks.

On Fri, Jun 12, 2015 at 5:00 PM, Mike Bostock [email protected]
wrote:

That’s a heavily modified version of Stack.js… it’s barely recognizable.
Did you make those modifications are asking me to help, or are you using
someone else’s fork? In either case, I don’t think I can help because it
goes too far beyond the original design and intent of this library. In
particular, it uses scrolljacking to snap to slide boundaries, which goes
against one of the primary motivations of this library. (See my How To
Scroll http://bost.ocks.org/mike/scroll/ essay for more.)

I’d be okay with supporting swipe-to-advance on iOS, but that’s only
because you can tell when the fingers are touching the input device and
thus reliably discern swipe gestures. That’s not true on desktop.


Reply to this email directly or view it on GitHub
#19 (comment).

Al Lemieux
90 Currier Rd
Pelham, NH 03076
www.lemieux-design.net
[email protected]

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

No branches or pull requests

3 participants