{"action":"created","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/3109","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/3109/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/3109/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/3109/events","html_url":"https://github.com/openlayers/ol3/pull/3109","id":53880218,"number":3109,"title":"Snap feature","user":{"login":"fperucic","id":10003528,"avatar_url":"https://avatars.githubusercontent.com/u/10003528?v=3","gravatar_id":"","url":"https://api.github.com/users/fperucic","html_url":"https://github.com/fperucic","followers_url":"https://api.github.com/users/fperucic/followers","following_url":"https://api.github.com/users/fperucic/following{/other_user}","gists_url":"https://api.github.com/users/fperucic/gists{/gist_id}","starred_url":"https://api.github.com/users/fperucic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fperucic/subscriptions","organizations_url":"https://api.github.com/users/fperucic/orgs","repos_url":"https://api.github.com/users/fperucic/repos","events_url":"https://api.github.com/users/fperucic/events{/privacy}","received_events_url":"https://api.github.com/users/fperucic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":38,"created_at":"2015-01-09T15:39:58Z","updated_at":"2015-03-26T14:35:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openlayers/ol3/pulls/3109","html_url":"https://github.com/openlayers/ol3/pull/3109","diff_url":"https://github.com/openlayers/ol3/pull/3109.diff","patch_url":"https://github.com/openlayers/ol3/pull/3109.patch"},"body":"This is my implementation of a snap control discussed in #1164 \r\n\r\nIt uses simmilar snap implementation as ol.interaction.modify so you need to be careful when modifying the original geometry. Otherwise problems my occur as in #3093 where the user is not paying attention to rebuild the snap index of the modify interaction upon dragging the original geometry.\r\n\r\nHere is the [demo](http://server2.prometiprostor.hr/fperucic/ol-hosted/snap-feature/examples/snap.html?q=snap)"},"comment":{"url":"https://api.github.com/repos/openlayers/ol3/issues/comments/86542482","html_url":"https://github.com/openlayers/ol3/pull/3109#issuecomment-86542482","issue_url":"https://api.github.com/repos/openlayers/ol3/issues/3109","id":86542482,"user":{"login":"adube","id":432436,"avatar_url":"https://avatars.githubusercontent.com/u/432436?v=3","gravatar_id":"","url":"https://api.github.com/users/adube","html_url":"https://github.com/adube","followers_url":"https://api.github.com/users/adube/followers","following_url":"https://api.github.com/users/adube/following{/other_user}","gists_url":"https://api.github.com/users/adube/gists{/gist_id}","starred_url":"https://api.github.com/users/adube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adube/subscriptions","organizations_url":"https://api.github.com/users/adube/orgs","repos_url":"https://api.github.com/users/adube/repos","events_url":"https://api.github.com/users/adube/events{/privacy}","received_events_url":"https://api.github.com/users/adube/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T14:35:32Z","updated_at":"2015-03-26T14:35:32Z","body":"The Snap interaction can listen to the geometry change to update the geometry index, but at that moment it is not aware how it occurred.  From that moment, it is not aware that the geometry was changed by dragging the feature using a modify feature control.\r\n\r\nBut, the Snap being an interaction and already listening to those kind of map browser events, it could use a flag to let the geometry changed handler aware that the previous event was a 'pointerdrag' one.\r\n\r\nWould it be an acceptable solution to use a delay (let's say 250ms) for modifications made after drag events, which would avoid updating the indexes too often ?"}}