{"action":"created","comment":{"url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/comments/71302185","id":71302185,"diff_hunk":"@@ -96,50 +61,112 @@ class Favourites extends Component {\n         this.props.bindings.toggleFavourite(stockCode);\n     }\n \n-    addDropTarget(id) {\n-        const dropTarget = document.getElementById(id);\n-        this.dropTarget = dropTarget;\n+    onDragStart(e) {\n+        const { favourites, bindings } = this.props;\n+\n+        this.dragOverIndex = favourites.codes.indexOf(bindings.getCodeFromDT(e.dataTransfer.types));\n+        this.dragStartClientY = e.nativeEvent.clientY;\n+    }\n+\n+    onDragOver(e) {\n+        const { dragStartClientY, favouriteElements, removeDragOver, props } = this;\n+        const { favourites, bindings } = props;\n \n-        dropTarget.addEventListener('drop', e => {\n-            const codes = this.props.favourites.codes;\n-            const code = e.dataTransfer.getData('text/plain');\n-            this.props.dispatch(insertFavouriteAt(codes.length, code));\n-            dropTarget.classList.remove('dragOver');\n-        }, false);\n+        if (dragStartClientY) {\n+            const favouriteHeight = 110;","path":"src/child/containers/sidebars/favourites/Favourites.js","position":106,"original_position":106,"commit_id":"bcbed3b58ccf9fe81254e437aabf1b29ed0168c8","original_commit_id":"bcbed3b58ccf9fe81254e437aabf1b29ed0168c8","user":{"login":"rjmcneill","id":10117342,"avatar_url":"https://avatars.githubusercontent.com/u/10117342?v=3","gravatar_id":"","url":"https://api.github.com/users/rjmcneill","html_url":"https://github.com/rjmcneill","followers_url":"https://api.github.com/users/rjmcneill/followers","following_url":"https://api.github.com/users/rjmcneill/following{/other_user}","gists_url":"https://api.github.com/users/rjmcneill/gists{/gist_id}","starred_url":"https://api.github.com/users/rjmcneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjmcneill/subscriptions","organizations_url":"https://api.github.com/users/rjmcneill/orgs","repos_url":"https://api.github.com/users/rjmcneill/repos","events_url":"https://api.github.com/users/rjmcneill/events{/privacy}","received_events_url":"https://api.github.com/users/rjmcneill/received_events","type":"User","site_admin":false},"body":"Could we get this from the HTML element itself?","created_at":"2016-07-19T09:31:04Z","updated_at":"2016-07-19T09:31:04Z","html_url":"https://github.com/ScottLogic/StockFlux/pull/867#discussion_r71302185","pull_request_url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867","_links":{"self":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/comments/71302185"},"html":{"href":"https://github.com/ScottLogic/StockFlux/pull/867#discussion_r71302185"},"pull_request":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867"}}},"pull_request":{"url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867","id":77316559,"html_url":"https://github.com/ScottLogic/StockFlux/pull/867","diff_url":"https://github.com/ScottLogic/StockFlux/pull/867.diff","patch_url":"https://github.com/ScottLogic/StockFlux/pull/867.patch","issue_url":"https://api.github.com/repos/ScottLogic/StockFlux/issues/867","number":867,"state":"open","locked":false,"title":"fix: fix drag and drop","user":{"login":"jdhodges","id":14218569,"avatar_url":"https://avatars.githubusercontent.com/u/14218569?v=3","gravatar_id":"","url":"https://api.github.com/users/jdhodges","html_url":"https://github.com/jdhodges","followers_url":"https://api.github.com/users/jdhodges/followers","following_url":"https://api.github.com/users/jdhodges/following{/other_user}","gists_url":"https://api.github.com/users/jdhodges/gists{/gist_id}","starred_url":"https://api.github.com/users/jdhodges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdhodges/subscriptions","organizations_url":"https://api.github.com/users/jdhodges/orgs","repos_url":"https://api.github.com/users/jdhodges/repos","events_url":"https://api.github.com/users/jdhodges/events{/privacy}","received_events_url":"https://api.github.com/users/jdhodges/received_events","type":"User","site_admin":false},"body":"Does not include the removal of a favourite from window X when dragged from window Y as this is covered by #864.","created_at":"2016-07-13T16:06:44Z","updated_at":"2016-07-19T09:31:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"115a7759502544a139944798e4676e4262944788","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867/commits","review_comments_url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867/comments","review_comment_url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ScottLogic/StockFlux/issues/867/comments","statuses_url":"https://api.github.com/repos/ScottLogic/StockFlux/statuses/bcbed3b58ccf9fe81254e437aabf1b29ed0168c8","head":{"label":"jdhodges:fix/dnd","ref":"fix/dnd","sha":"bcbed3b58ccf9fe81254e437aabf1b29ed0168c8","user":{"login":"jdhodges","id":14218569,"avatar_url":"https://avatars.githubusercontent.com/u/14218569?v=3","gravatar_id":"","url":"https://api.github.com/users/jdhodges","html_url":"https://github.com/jdhodges","followers_url":"https://api.github.com/users/jdhodges/followers","following_url":"https://api.github.com/users/jdhodges/following{/other_user}","gists_url":"https://api.github.com/users/jdhodges/gists{/gist_id}","starred_url":"https://api.github.com/users/jdhodges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdhodges/subscriptions","organizations_url":"https://api.github.com/users/jdhodges/orgs","repos_url":"https://api.github.com/users/jdhodges/repos","events_url":"https://api.github.com/users/jdhodges/events{/privacy}","received_events_url":"https://api.github.com/users/jdhodges/received_events","type":"User","site_admin":false},"repo":{"id":58470172,"name":"StockFlux","full_name":"jdhodges/StockFlux","owner":{"login":"jdhodges","id":14218569,"avatar_url":"https://avatars.githubusercontent.com/u/14218569?v=3","gravatar_id":"","url":"https://api.github.com/users/jdhodges","html_url":"https://github.com/jdhodges","followers_url":"https://api.github.com/users/jdhodges/followers","following_url":"https://api.github.com/users/jdhodges/following{/other_user}","gists_url":"https://api.github.com/users/jdhodges/gists{/gist_id}","starred_url":"https://api.github.com/users/jdhodges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdhodges/subscriptions","organizations_url":"https://api.github.com/users/jdhodges/orgs","repos_url":"https://api.github.com/users/jdhodges/repos","events_url":"https://api.github.com/users/jdhodges/events{/privacy}","received_events_url":"https://api.github.com/users/jdhodges/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdhodges/StockFlux","description":"StockFlux is a desktop application developed by Scott Logic that uses the OpenFin HTML5 container together with AngularJS, ES2015 and d3fc","fork":true,"url":"https://api.github.com/repos/jdhodges/StockFlux","forks_url":"https://api.github.com/repos/jdhodges/StockFlux/forks","keys_url":"https://api.github.com/repos/jdhodges/StockFlux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdhodges/StockFlux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdhodges/StockFlux/teams","hooks_url":"https://api.github.com/repos/jdhodges/StockFlux/hooks","issue_events_url":"https://api.github.com/repos/jdhodges/StockFlux/issues/events{/number}","events_url":"https://api.github.com/repos/jdhodges/StockFlux/events","assignees_url":"https://api.github.com/repos/jdhodges/StockFlux/assignees{/user}","branches_url":"https://api.github.com/repos/jdhodges/StockFlux/branches{/branch}","tags_url":"https://api.github.com/repos/jdhodges/StockFlux/tags","blobs_url":"https://api.github.com/repos/jdhodges/StockFlux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdhodges/StockFlux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdhodges/StockFlux/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdhodges/StockFlux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdhodges/StockFlux/statuses/{sha}","languages_url":"https://api.github.com/repos/jdhodges/StockFlux/languages","stargazers_url":"https://api.github.com/repos/jdhodges/StockFlux/stargazers","contributors_url":"https://api.github.com/repos/jdhodges/StockFlux/contributors","subscribers_url":"https://api.github.com/repos/jdhodges/StockFlux/subscribers","subscription_url":"https://api.github.com/repos/jdhodges/StockFlux/subscription","commits_url":"https://api.github.com/repos/jdhodges/StockFlux/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdhodges/StockFlux/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdhodges/StockFlux/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdhodges/StockFlux/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdhodges/StockFlux/contents/{+path}","compare_url":"https://api.github.com/repos/jdhodges/StockFlux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdhodges/StockFlux/merges","archive_url":"https://api.github.com/repos/jdhodges/StockFlux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdhodges/StockFlux/downloads","issues_url":"https://api.github.com/repos/jdhodges/StockFlux/issues{/number}","pulls_url":"https://api.github.com/repos/jdhodges/StockFlux/pulls{/number}","milestones_url":"https://api.github.com/repos/jdhodges/StockFlux/milestones{/number}","notifications_url":"https://api.github.com/repos/jdhodges/StockFlux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdhodges/StockFlux/labels{/name}","releases_url":"https://api.github.com/repos/jdhodges/StockFlux/releases{/id}","deployments_url":"https://api.github.com/repos/jdhodges/StockFlux/deployments","created_at":"2016-05-10T14:53:12Z","updated_at":"2016-05-10T14:53:13Z","pushed_at":"2016-07-19T08:07:55Z","git_url":"git://github.com/jdhodges/StockFlux.git","ssh_url":"git@github.com:jdhodges/StockFlux.git","clone_url":"https://github.com/jdhodges/StockFlux.git","svn_url":"https://github.com/jdhodges/StockFlux","homepage":"","size":2928,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ScottLogic:react_redux","ref":"react_redux","sha":"7dc2010fc8b7f85748f24d77e5bcfe793e02b71f","user":{"login":"ScottLogic","id":2046037,"avatar_url":"https://avatars.githubusercontent.com/u/2046037?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottLogic","html_url":"https://github.com/ScottLogic","followers_url":"https://api.github.com/users/ScottLogic/followers","following_url":"https://api.github.com/users/ScottLogic/following{/other_user}","gists_url":"https://api.github.com/users/ScottLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottLogic/subscriptions","organizations_url":"https://api.github.com/users/ScottLogic/orgs","repos_url":"https://api.github.com/users/ScottLogic/repos","events_url":"https://api.github.com/users/ScottLogic/events{/privacy}","received_events_url":"https://api.github.com/users/ScottLogic/received_events","type":"Organization","site_admin":false},"repo":{"id":47250097,"name":"StockFlux","full_name":"ScottLogic/StockFlux","owner":{"login":"ScottLogic","id":2046037,"avatar_url":"https://avatars.githubusercontent.com/u/2046037?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottLogic","html_url":"https://github.com/ScottLogic","followers_url":"https://api.github.com/users/ScottLogic/followers","following_url":"https://api.github.com/users/ScottLogic/following{/other_user}","gists_url":"https://api.github.com/users/ScottLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottLogic/subscriptions","organizations_url":"https://api.github.com/users/ScottLogic/orgs","repos_url":"https://api.github.com/users/ScottLogic/repos","events_url":"https://api.github.com/users/ScottLogic/events{/privacy}","received_events_url":"https://api.github.com/users/ScottLogic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ScottLogic/StockFlux","description":"StockFlux is a desktop application developed by Scott Logic that uses the OpenFin HTML5 container together with AngularJS, ES2015 and d3fc","fork":false,"url":"https://api.github.com/repos/ScottLogic/StockFlux","forks_url":"https://api.github.com/repos/ScottLogic/StockFlux/forks","keys_url":"https://api.github.com/repos/ScottLogic/StockFlux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScottLogic/StockFlux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScottLogic/StockFlux/teams","hooks_url":"https://api.github.com/repos/ScottLogic/StockFlux/hooks","issue_events_url":"https://api.github.com/repos/ScottLogic/StockFlux/issues/events{/number}","events_url":"https://api.github.com/repos/ScottLogic/StockFlux/events","assignees_url":"https://api.github.com/repos/ScottLogic/StockFlux/assignees{/user}","branches_url":"https://api.github.com/repos/ScottLogic/StockFlux/branches{/branch}","tags_url":"https://api.github.com/repos/ScottLogic/StockFlux/tags","blobs_url":"https://api.github.com/repos/ScottLogic/StockFlux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScottLogic/StockFlux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScottLogic/StockFlux/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScottLogic/StockFlux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScottLogic/StockFlux/statuses/{sha}","languages_url":"https://api.github.com/repos/ScottLogic/StockFlux/languages","stargazers_url":"https://api.github.com/repos/ScottLogic/StockFlux/stargazers","contributors_url":"https://api.github.com/repos/ScottLogic/StockFlux/contributors","subscribers_url":"https://api.github.com/repos/ScottLogic/StockFlux/subscribers","subscription_url":"https://api.github.com/repos/ScottLogic/StockFlux/subscription","commits_url":"https://api.github.com/repos/ScottLogic/StockFlux/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScottLogic/StockFlux/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScottLogic/StockFlux/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScottLogic/StockFlux/issues/comments{/number}","contents_url":"https://api.github.com/repos/ScottLogic/StockFlux/contents/{+path}","compare_url":"https://api.github.com/repos/ScottLogic/StockFlux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScottLogic/StockFlux/merges","archive_url":"https://api.github.com/repos/ScottLogic/StockFlux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScottLogic/StockFlux/downloads","issues_url":"https://api.github.com/repos/ScottLogic/StockFlux/issues{/number}","pulls_url":"https://api.github.com/repos/ScottLogic/StockFlux/pulls{/number}","milestones_url":"https://api.github.com/repos/ScottLogic/StockFlux/milestones{/number}","notifications_url":"https://api.github.com/repos/ScottLogic/StockFlux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScottLogic/StockFlux/labels{/name}","releases_url":"https://api.github.com/repos/ScottLogic/StockFlux/releases{/id}","deployments_url":"https://api.github.com/repos/ScottLogic/StockFlux/deployments","created_at":"2015-12-02T09:18:18Z","updated_at":"2016-07-15T13:27:22Z","pushed_at":"2016-07-19T08:07:55Z","git_url":"git://github.com/ScottLogic/StockFlux.git","ssh_url":"git@github.com:ScottLogic/StockFlux.git","clone_url":"https://github.com/ScottLogic/StockFlux.git","svn_url":"https://github.com/ScottLogic/StockFlux","homepage":"","size":5695,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":57,"forks":10,"open_issues":57,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867"},"html":{"href":"https://github.com/ScottLogic/StockFlux/pull/867"},"issue":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/issues/867"},"comments":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/issues/867/comments"},"review_comments":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867/comments"},"review_comment":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/pulls/867/commits"},"statuses":{"href":"https://api.github.com/repos/ScottLogic/StockFlux/statuses/bcbed3b58ccf9fe81254e437aabf1b29ed0168c8"}}}}
{"actor":{"display_login":"rjmcneill"}}