{"action":"created","issue":{"url":"https://api.github.com/repos/vega/vega/issues/510","repository_url":"https://api.github.com/repos/vega/vega","labels_url":"https://api.github.com/repos/vega/vega/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/vega/vega/issues/510/comments","events_url":"https://api.github.com/repos/vega/vega/issues/510/events","html_url":"https://github.com/vega/vega/issues/510","id":130611442,"number":510,"title":"Zooming does not seem to work for mouse wheel scrolling in the panzoom example","user":{"login":"eidehua","id":7684873,"avatar_url":"https://avatars.githubusercontent.com/u/7684873?v=3","gravatar_id":"","url":"https://api.github.com/users/eidehua","html_url":"https://github.com/eidehua","followers_url":"https://api.github.com/users/eidehua/followers","following_url":"https://api.github.com/users/eidehua/following{/other_user}","gists_url":"https://api.github.com/users/eidehua/gists{/gist_id}","starred_url":"https://api.github.com/users/eidehua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eidehua/subscriptions","organizations_url":"https://api.github.com/users/eidehua/orgs","repos_url":"https://api.github.com/users/eidehua/repos","events_url":"https://api.github.com/users/eidehua/events{/privacy}","received_events_url":"https://api.github.com/users/eidehua/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-02T08:32:42Z","updated_at":"2016-02-03T09:31:00Z","closed_at":null,"body":"http://vega.github.io/vega-editor/?mode=vega&spec=panzoom_points\r\n\r\nIn this example, I am able to zoom in and out perfectly find with a trackpad gesture, but using a mouse scroll wheel seems to break the zoom.\r\n\r\nI noticed in the signals xMin, xMax, yMin, yMax has this field:\r\n        {\"type\": \"zoom\", \"expr\": \"(xs.max-xAnchor)*zoom + xAnchor\"}\r\n\r\nWhen I replace the \"zoom\" with \"wheel\" (for the type) for all 4 of the signals, both trackpad and mouse wheel work fine (it seems to me)\r\n\r\nAny idea why using \"type\" : \"zoom\" would not work for mouse wheel scrolling? I don't exactly understand the signal syntax going on here. "},"comment":{"url":"https://api.github.com/repos/vega/vega/issues/comments/179120602","html_url":"https://github.com/vega/vega/issues/510#issuecomment-179120602","issue_url":"https://api.github.com/repos/vega/vega/issues/510","id":179120602,"user":{"login":"Jerrythafast","id":2095375,"avatar_url":"https://avatars.githubusercontent.com/u/2095375?v=3","gravatar_id":"","url":"https://api.github.com/users/Jerrythafast","html_url":"https://github.com/Jerrythafast","followers_url":"https://api.github.com/users/Jerrythafast/followers","following_url":"https://api.github.com/users/Jerrythafast/following{/other_user}","gists_url":"https://api.github.com/users/Jerrythafast/gists{/gist_id}","starred_url":"https://api.github.com/users/Jerrythafast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jerrythafast/subscriptions","organizations_url":"https://api.github.com/users/Jerrythafast/orgs","repos_url":"https://api.github.com/users/Jerrythafast/repos","events_url":"https://api.github.com/users/Jerrythafast/events{/privacy}","received_events_url":"https://api.github.com/users/Jerrythafast/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T09:31:00Z","updated_at":"2016-02-03T09:31:00Z","body":"As you can see in the signal definition, the `zoom` signal listens for mouse wheel events. Whenever such an event occurs, it computes the amount that the wheel has turned (the 'wheel delta'). On most systems, every 'click' of the mouse wheel is a fixed delta value. Therefore, the value of the signal does not really change (it literally changes to the same value it had before). The `\"verbose\": true` property tells Vega that even though the value didn't change, the graph should be updated whenever the event fires."}}