{"action":"created","issue":{"url":"https://api.github.com/repos/taye/interact.js/issues/483","repository_url":"https://api.github.com/repos/taye/interact.js","labels_url":"https://api.github.com/repos/taye/interact.js/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/taye/interact.js/issues/483/comments","events_url":"https://api.github.com/repos/taye/interact.js/issues/483/events","html_url":"https://github.com/taye/interact.js/issues/483","id":203758681,"number":483,"title":"Snap the edges","user":{"login":"NewInGit","id":24973616,"avatar_url":"https://avatars.githubusercontent.com/u/24973616?v=3","gravatar_id":"","url":"https://api.github.com/users/NewInGit","html_url":"https://github.com/NewInGit","followers_url":"https://api.github.com/users/NewInGit/followers","following_url":"https://api.github.com/users/NewInGit/following{/other_user}","gists_url":"https://api.github.com/users/NewInGit/gists{/gist_id}","starred_url":"https://api.github.com/users/NewInGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewInGit/subscriptions","organizations_url":"https://api.github.com/users/NewInGit/orgs","repos_url":"https://api.github.com/users/NewInGit/repos","events_url":"https://api.github.com/users/NewInGit/events{/privacy}","received_events_url":"https://api.github.com/users/NewInGit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-27T22:42:00Z","updated_at":"2017-01-29T03:59:30Z","closed_at":"2017-01-28T22:17:21Z","body":"Hi, thank you for interact.js , great job,\r\nI have a question, I know I can use relativePoints, and set the snap point of an element to top-left corner or the center or any other points, but I need to snap the four edges of the rectangle, not some points of it. Is it possible?\r\n\r\nI used\r\n```\r\ntargets: [\r\n      { x: 100, range: 50 },\r\n      { y: 100, range: 50 },\r\n    ],\r\nrelativePoints: [\r\n      { x: 0  , y: 0   } ,\r\n      { x: 1  , y: 0   } ,\r\n      { x: 0  , y: 1  } ,\r\n      { x: 1  , y: 1   },\r\n    ]\r\n```\r\nIt works, But when I bring the element near a snap line, it jumps to snap, but also has an unintentional movement in every four direction.\r\n\r\nHere is the [fiddle](https://jsfiddle.net/coolesterman/n5auybzj/).\r\n"},"comment":{"url":"https://api.github.com/repos/taye/interact.js/issues/comments/275892364","html_url":"https://github.com/taye/interact.js/issues/483#issuecomment-275892364","issue_url":"https://api.github.com/repos/taye/interact.js/issues/483","id":275892364,"user":{"login":"NewInGit","id":24973616,"avatar_url":"https://avatars.githubusercontent.com/u/24973616?v=3","gravatar_id":"","url":"https://api.github.com/users/NewInGit","html_url":"https://github.com/NewInGit","followers_url":"https://api.github.com/users/NewInGit/followers","following_url":"https://api.github.com/users/NewInGit/following{/other_user}","gists_url":"https://api.github.com/users/NewInGit/gists{/gist_id}","starred_url":"https://api.github.com/users/NewInGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewInGit/subscriptions","organizations_url":"https://api.github.com/users/NewInGit/orgs","repos_url":"https://api.github.com/users/NewInGit/repos","events_url":"https://api.github.com/users/NewInGit/events{/privacy}","received_events_url":"https://api.github.com/users/NewInGit/received_events","type":"User","site_admin":false},"created_at":"2017-01-29T03:59:30Z","updated_at":"2017-01-29T03:59:30Z","body":"ooh! didn't know about the order. Thank you TAYE.\r\nSorry to bother, But What about my other question, \"snapping the edges of a rectangle not some points of it?\"\r\nInstead of:\r\n```\r\nrelativePoints: [\r\n      { x: 0  , y: 0   } ,\r\n      { x: 1  , y: 0   } ,\r\n      { x: 0  , y: 1  } ,\r\n      { x: 1  , y: 1   },\r\n    ]\r\n```\r\nI need something like this:\r\n```\r\nrelativePoints: [\r\n      the four edges\r\n    ]\r\n```\r\n![untitled-1](https://cloud.githubusercontent.com/assets/24973616/22401748/61d42492-e5f4-11e6-85f5-8c08326aac4b.png)"}}
{"actor":{"display_login":"NewInGit"}}