Skip to content

Conversation

@spetex
Copy link

@spetex spetex commented Aug 27, 2019

As discussed in the issue: #186

I am preventing pan and event cancellation if the content has reached the translateExtent.

I have tested this on an iPhone and multiple different browsers I have on my laptop.

.on("touchstart.zoom", touchstarted)
.on("touchmove.zoom", touchmoved)
.on("touchend.zoom touchcancel.zoom", touchended)
.style("touch-action", "none")
Copy link
Author

@spetex spetex Aug 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have not found the reason for this class. It unfortunately prevents natural page scroll to apply. We can probably programatically add and remove the class during the touchmove if it is necessary.


var move = constrain(translate(t, p, l), g.extent, translateExtent);

if ((move.x != 0 || move.y != 0) && !touchScroll) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

touchScroll we need to prevent the noevent() when you are already scrolling the page, the browser ingores it anyways

@Fil Fil mentioned this pull request Jul 10, 2020
@Fil Fil mentioned this pull request Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant