{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/issues/118","repository_url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs","labels_url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/issues/118/comments","events_url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/issues/118/events","html_url":"https://github.com/Microsoft/WindowsUIDevLabs/issues/118","id":164954976,"number":118,"title":"Detect two finger gestures over ScrollViewer","user":{"login":"mjracca","id":3976257,"avatar_url":"https://avatars.githubusercontent.com/u/3976257?v=3","gravatar_id":"","url":"https://api.github.com/users/mjracca","html_url":"https://github.com/mjracca","followers_url":"https://api.github.com/users/mjracca/followers","following_url":"https://api.github.com/users/mjracca/following{/other_user}","gists_url":"https://api.github.com/users/mjracca/gists{/gist_id}","starred_url":"https://api.github.com/users/mjracca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjracca/subscriptions","organizations_url":"https://api.github.com/users/mjracca/orgs","repos_url":"https://api.github.com/users/mjracca/repos","events_url":"https://api.github.com/users/mjracca/events{/privacy}","received_events_url":"https://api.github.com/users/mjracca/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"likuba","id":12201461,"avatar_url":"https://avatars.githubusercontent.com/u/12201461?v=3","gravatar_id":"","url":"https://api.github.com/users/likuba","html_url":"https://github.com/likuba","followers_url":"https://api.github.com/users/likuba/followers","following_url":"https://api.github.com/users/likuba/following{/other_user}","gists_url":"https://api.github.com/users/likuba/gists{/gist_id}","starred_url":"https://api.github.com/users/likuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likuba/subscriptions","organizations_url":"https://api.github.com/users/likuba/orgs","repos_url":"https://api.github.com/users/likuba/repos","events_url":"https://api.github.com/users/likuba/events{/privacy}","received_events_url":"https://api.github.com/users/likuba/received_events","type":"User","site_admin":false},"assignees":[{"login":"likuba","id":12201461,"avatar_url":"https://avatars.githubusercontent.com/u/12201461?v=3","gravatar_id":"","url":"https://api.github.com/users/likuba","html_url":"https://github.com/likuba","followers_url":"https://api.github.com/users/likuba/followers","following_url":"https://api.github.com/users/likuba/following{/other_user}","gists_url":"https://api.github.com/users/likuba/gists{/gist_id}","starred_url":"https://api.github.com/users/likuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likuba/subscriptions","organizations_url":"https://api.github.com/users/likuba/orgs","repos_url":"https://api.github.com/users/likuba/repos","events_url":"https://api.github.com/users/likuba/events{/privacy}","received_events_url":"https://api.github.com/users/likuba/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-07-11T22:33:58Z","updated_at":"2016-07-18T22:16:44Z","closed_at":null,"body":"### The question\r\nWe need to detect two finger gestures (pan and pinch) over a ScrollViewer, is there any way to do this?\r\n\r\n### The context\r\nWe have multiple issues when trying to pan and zoom a ScrollViewer which contains multiple elements. This elements can be dragged as well. We don't want to select the elements first to move them around as others apps, since we value the speed it give us like this.\r\n\r\nHere is an normal example of our canvas (it can be much more dense than this):\r\n![image](https://cloud.githubusercontent.com/assets/3976257/16746768/519b1654-4792-11e6-96d5-dc6072be2fbe.png)\r\n\r\n### Errors cases\r\nI have drawn 4 examples of what we want to achieve, and what currently happens, as an example. The yellow square is a XAML element that is inside a ScrollViewer, and the dots are the fingers and their movement.\r\n\r\n**1.** Moving an element and panning the canvas when trying to zoom \r\n\r\n**What we do:** We try to pinch the canvas and accidentally touch one element with one finger, and the canvas with the other.\r\n**What we expect:** To zoom the canvas.\r\n**What happens:** The element moves with one finger, the canvas pan with the other.\r\n\r\n<img src=\"https://cloud.githubusercontent.com/assets/3976257/16748280/8ffbcb76-4799-11e6-89e6-ebcf0555cf93.jpg\" width=\"200\">\r\n\r\n**2.** Moving an element when trying to pan\r\n\r\n**What we do:** We try to pan the canvas with two fingers and accidentally touch one element with one finger, and the canvas with the other.\r\n**What we expect:** To pan the canvas.\r\n**What happens:** The element moves with one finger, the canvas pan with the other.\r\n\r\n<img src=\"https://cloud.githubusercontent.com/assets/3976257/16748282/8ffff46c-4799-11e6-832b-35d1c6fe04f2.jpg\" width=\"200\">\r\n\r\n**3.** Moving two elements when trying to zoom \r\n\r\n**What we do:** We try to pinch the canvas and accidentally touch one element with one finger, and another with the other finger.\r\n**What we expect:** To zoom the canvas.\r\n**What happens:** Both elements move with each finger.\r\n\r\n<img src=\"https://cloud.githubusercontent.com/assets/3976257/16748281/8ffe0b8e-4799-11e6-86bd-17b454f75a3a.jpg\" width=\"200\">\r\n\r\n**4.** Moving two elements at the same time\r\n\r\n**What we do:** We try moving two elements at the same time with two different hands.\r\n**What we expect:** Both elements move with each finger. \r\n**What happens:** Both elements move with each finger. 👍 \r\n\r\n_We don't want to break this interaction, if the fingers are too far apart, if should be registered as individual pointers and not as a two finger gesture._\r\n\r\n<img src=\"https://cloud.githubusercontent.com/assets/3976257/16748279/8ffa19a2-4799-11e6-9a88-813bc0d4e99b.jpg\" width=\"200\">\r\n\r\nIt would be really helpful if we could detect two finger gestures and use it to pan and zoom the canvas, instead of moving elements.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/issues/comments/233475993","html_url":"https://github.com/Microsoft/WindowsUIDevLabs/issues/118#issuecomment-233475993","issue_url":"https://api.github.com/repos/Microsoft/WindowsUIDevLabs/issues/118","id":233475993,"user":{"login":"JustinXinLiu","id":1710184,"avatar_url":"https://avatars.githubusercontent.com/u/1710184?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinXinLiu","html_url":"https://github.com/JustinXinLiu","followers_url":"https://api.github.com/users/JustinXinLiu/followers","following_url":"https://api.github.com/users/JustinXinLiu/following{/other_user}","gists_url":"https://api.github.com/users/JustinXinLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinXinLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinXinLiu/subscriptions","organizations_url":"https://api.github.com/users/JustinXinLiu/orgs","repos_url":"https://api.github.com/users/JustinXinLiu/repos","events_url":"https://api.github.com/users/JustinXinLiu/events{/privacy}","received_events_url":"https://api.github.com/users/JustinXinLiu/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T22:16:44Z","updated_at":"2016-07-18T22:16:44Z","body":"@mikehenderlight unless the behavior is changed in your build, `PointerMoved` and `PointerReleased` events won't be raised within a `ScrollViewer`.\r\n\r\nI suspect you might be testing with a mouse as `PointerMoved` and `PointerReleased` events **do** get raised with mouse click but **not** with touch."}}
{"actor":{"display_login":"JustinXinLiu"}}