RE: Last Call comments

> > I have had no problem using setPointerCapture and solving your marker/map issue, as can be seen here:
>
> I have no problem in solving this case two; what really troubles me is the situation when we have no control over whole system. The dragging behavior can be easily produced by some user framework, and then we have no ways to produce desirable behavior from our side. How do we solve such a case, when container dragging is implemented by user?

Exactly the way I did: you set the pointer capture tentatively during the tunneling phase: if a child (in this case: the marker) want the capture, it can still get it and I (the map) will continue to be notified by the events because I know the event do bubble.

If my case, I went further and made sure the pointer capture was being reset at every stage (pointermove) of the gesture, because it allow the map to get the direct capture when the marker detects it cannot handle the gesture.


> My concern is the lots of possibilities to use this feature incorrectly; this feature really works only when you are fully control your page and every single script on it. But this situation are vary rare in the modern web. Since the spec doesn't provide any mechanism for handling collisions, it is unsuitable for modern web.

I don't think there are so much. The only thing you can get wrong is the order in which you set the captures. If you setup a standard (like: setup captures in the tunneling phase like I did), you're completely safe. 


> And how the capturing solves the iframe problem?

When a pointer is captured, the events continue to fire even if the pointer moves outside the current document, and even outside the current window (on IE/Windows). So, I can continue to drag my map outside the current window, and therefore also outside the current iframe.


> The main advantage of document capturing is its complete transprency. You cannot break any other script on page using document capruting.

That's completely false. You can get very weird behavior on the document because of stopImmediatePropagation because then the order in which the events are registered start to matter, and you've no way to control that if you don't control every script.


> > PS: To be efficient, one should probably prevent the 'pointerdown' event to bubble to the ancestors of the map, because any gesture at an higher level than the map should never be triggered once the drag gesture did start.
>
> That will be event worse. I could easily imagine lots of behaviors that dwell on the same events and do not conflict - the drag/click/multitouch example is the simplest one.

Not once the drag behavior did start. Once you start dragging, you don't want any other gesture to happen using the pointers currently consumed by the drag behavior. 		 	   		  

Received on Tuesday, 9 April 2013 11:02:48 UTC