{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments/32376718","id":32376718,"diff_hunk":"@@ -137,16 +126,238 @@\n         this._scrollBarWidth = this.getScrollbarWidth();\n     };\n \n+    Grid.prototype.calcGridCoordinates = function () {\n+        var xCoords = [];\n+        this._offsetX = this._element.node().getBoundingClientRect().left + (this.gutter()/2);\n+        for(var i = 0;i<this._colCount;i++){\n+            xCoords.push((i * this._colSize) + this._offsetX);\n+        }\n+        var yCoords = [];\n+        this._offsetY = this._element.node().getBoundingClientRect().top + (this.gutter()/2);\n+        for(var j = 0;j<this._rowCount;j++){\n+            yCoords.push((j * this._rowSize) + this._offsetY);\n+        }\n+        this._gridCoordinates = {x:xCoords,y:yCoords};\n+    };\n+    \n+    Grid.prototype.findCurrentLocation = function (e) {\n+        var x_loc,y_loc;\n+        for(var x1 = 0;x1<this._gridCoordinates.x.length;x1++){\n+            if(parseInt(this._gridCoordinates.x[x1]) <= e.clientX){\n+                x_loc = x1;\n+            }\n+        }\n+        for(var y1 = 0;y1<this._gridCoordinates.y.length;y1++){\n+            if(parseInt(this._gridCoordinates.y[y1]) <= e.clientY){\n+                y_loc = y1;\n+            }\n+        }\n+        if(typeof (x_loc) !== 'undefined' && typeof (y_loc) !== 'undefined'){\n+            this._currLoc = [x_loc,y_loc];\n+        }\n+    };\n+    \n+    Grid.prototype.overHandle = function (e) {\n+        var handle;\n+        var handleSize = this._dragCell.handleSize();\n+        \n+        //Determines which edge cell (if any) this._currLoc is hovering over\n+        //An \"edge\" meaning a dropCell on the exterrior edge of a surface that covers many cells\n+        var onSouthEdge = this._dragCell.gridRowSpan() === this._currLoc[1] - this._dragCell.gridRow() + 1;\n+        var onNorthEdge = this._dragCell.gridRow() === this._currLoc[1];\n+        var onEastEdge = this._dragCell.gridColSpan() === this._currLoc[0] - this._dragCell.gridCol() + 1;\n+        var onWestEdge = this._dragCell.gridCol() === this._currLoc[0];\n+        \n+        var top = this._offsetY + ((this._currLoc[1]) * this._rowSize);\n+        var left = this._offsetX + ((this._currLoc[0]) * this._colSize);\n+        var width = this._colSize - this.gutter();\n+        var height = this._rowSize - this.gutter();\n+        \n+        var handlesInRange = [];","path":"src/layout/Grid.js","position":92,"original_position":92,"commit_id":"fe83a3eac82a07e65607d87101d8cb8ed3af8701","original_commit_id":"fe83a3eac82a07e65607d87101d8cb8ed3af8701","user":{"login":"GordonSmith","id":966863,"avatar_url":"https://avatars.githubusercontent.com/u/966863?v=3","gravatar_id":"","url":"https://api.github.com/users/GordonSmith","html_url":"https://github.com/GordonSmith","followers_url":"https://api.github.com/users/GordonSmith/followers","following_url":"https://api.github.com/users/GordonSmith/following{/other_user}","gists_url":"https://api.github.com/users/GordonSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonSmith/subscriptions","organizations_url":"https://api.github.com/users/GordonSmith/orgs","repos_url":"https://api.github.com/users/GordonSmith/repos","events_url":"https://api.github.com/users/GordonSmith/events{/privacy}","received_events_url":"https://api.github.com/users/GordonSmith/received_events","type":"User","site_admin":false},"body":"This is ok for now - but this could be refactored to not use an array for handlesInRange","created_at":"2015-06-14T06:10:26Z","updated_at":"2015-06-14T06:10:26Z","html_url":"https://github.com/hpcc-systems/Visualization/pull/493#discussion_r32376718","pull_request_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments/32376718"},"html":{"href":"https://github.com/hpcc-systems/Visualization/pull/493#discussion_r32376718"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493","id":37585817,"html_url":"https://github.com/hpcc-systems/Visualization/pull/493","diff_url":"https://github.com/hpcc-systems/Visualization/pull/493.diff","patch_url":"https://github.com/hpcc-systems/Visualization/pull/493.patch","issue_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/493","number":493,"state":"open","locked":false,"title":"Enhances layout/Grid.js designMode with more intuitive dragging behavior","user":{"login":"jbrundage","id":1891935,"avatar_url":"https://avatars.githubusercontent.com/u/1891935?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrundage","html_url":"https://github.com/jbrundage","followers_url":"https://api.github.com/users/jbrundage/followers","following_url":"https://api.github.com/users/jbrundage/following{/other_user}","gists_url":"https://api.github.com/users/jbrundage/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrundage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrundage/subscriptions","organizations_url":"https://api.github.com/users/jbrundage/orgs","repos_url":"https://api.github.com/users/jbrundage/repos","events_url":"https://api.github.com/users/jbrundage/events{/privacy}","received_events_url":"https://api.github.com/users/jbrundage/received_events","type":"User","site_admin":false},"body":"@GordonSmith @mlzummo @dtsnell4 Please Review\r\n\r\nSigned-off-by: Jay Brundage <jaman.brundage@lexisnexis.com>","created_at":"2015-06-12T17:24:50Z","updated_at":"2015-06-14T06:10:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6c17c3de0abee660107c98a6d027b4d17698b4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/493/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/Visualization/statuses/fe83a3eac82a07e65607d87101d8cb8ed3af8701","head":{"label":"jbrundage:Grid_DesignMode_Enhancements","ref":"Grid_DesignMode_Enhancements","sha":"fe83a3eac82a07e65607d87101d8cb8ed3af8701","user":{"login":"jbrundage","id":1891935,"avatar_url":"https://avatars.githubusercontent.com/u/1891935?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrundage","html_url":"https://github.com/jbrundage","followers_url":"https://api.github.com/users/jbrundage/followers","following_url":"https://api.github.com/users/jbrundage/following{/other_user}","gists_url":"https://api.github.com/users/jbrundage/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrundage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrundage/subscriptions","organizations_url":"https://api.github.com/users/jbrundage/orgs","repos_url":"https://api.github.com/users/jbrundage/repos","events_url":"https://api.github.com/users/jbrundage/events{/privacy}","received_events_url":"https://api.github.com/users/jbrundage/received_events","type":"User","site_admin":false},"repo":{"id":30040848,"name":"Visualization","full_name":"jbrundage/Visualization","owner":{"login":"jbrundage","id":1891935,"avatar_url":"https://avatars.githubusercontent.com/u/1891935?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrundage","html_url":"https://github.com/jbrundage","followers_url":"https://api.github.com/users/jbrundage/followers","following_url":"https://api.github.com/users/jbrundage/following{/other_user}","gists_url":"https://api.github.com/users/jbrundage/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrundage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrundage/subscriptions","organizations_url":"https://api.github.com/users/jbrundage/orgs","repos_url":"https://api.github.com/users/jbrundage/repos","events_url":"https://api.github.com/users/jbrundage/events{/privacy}","received_events_url":"https://api.github.com/users/jbrundage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbrundage/Visualization","description":"Common Visualization Components","fork":true,"url":"https://api.github.com/repos/jbrundage/Visualization","forks_url":"https://api.github.com/repos/jbrundage/Visualization/forks","keys_url":"https://api.github.com/repos/jbrundage/Visualization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbrundage/Visualization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbrundage/Visualization/teams","hooks_url":"https://api.github.com/repos/jbrundage/Visualization/hooks","issue_events_url":"https://api.github.com/repos/jbrundage/Visualization/issues/events{/number}","events_url":"https://api.github.com/repos/jbrundage/Visualization/events","assignees_url":"https://api.github.com/repos/jbrundage/Visualization/assignees{/user}","branches_url":"https://api.github.com/repos/jbrundage/Visualization/branches{/branch}","tags_url":"https://api.github.com/repos/jbrundage/Visualization/tags","blobs_url":"https://api.github.com/repos/jbrundage/Visualization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbrundage/Visualization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbrundage/Visualization/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbrundage/Visualization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbrundage/Visualization/statuses/{sha}","languages_url":"https://api.github.com/repos/jbrundage/Visualization/languages","stargazers_url":"https://api.github.com/repos/jbrundage/Visualization/stargazers","contributors_url":"https://api.github.com/repos/jbrundage/Visualization/contributors","subscribers_url":"https://api.github.com/repos/jbrundage/Visualization/subscribers","subscription_url":"https://api.github.com/repos/jbrundage/Visualization/subscription","commits_url":"https://api.github.com/repos/jbrundage/Visualization/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbrundage/Visualization/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbrundage/Visualization/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbrundage/Visualization/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbrundage/Visualization/contents/{+path}","compare_url":"https://api.github.com/repos/jbrundage/Visualization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbrundage/Visualization/merges","archive_url":"https://api.github.com/repos/jbrundage/Visualization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbrundage/Visualization/downloads","issues_url":"https://api.github.com/repos/jbrundage/Visualization/issues{/number}","pulls_url":"https://api.github.com/repos/jbrundage/Visualization/pulls{/number}","milestones_url":"https://api.github.com/repos/jbrundage/Visualization/milestones{/number}","notifications_url":"https://api.github.com/repos/jbrundage/Visualization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbrundage/Visualization/labels{/name}","releases_url":"https://api.github.com/repos/jbrundage/Visualization/releases{/id}","created_at":"2015-01-29T20:55:48Z","updated_at":"2015-04-06T14:57:29Z","pushed_at":"2015-06-12T17:44:54Z","git_url":"git://github.com/jbrundage/Visualization.git","ssh_url":"git@github.com:jbrundage/Visualization.git","clone_url":"https://github.com/jbrundage/Visualization.git","svn_url":"https://github.com/jbrundage/Visualization","homepage":"","size":4886,"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":"hpcc-systems:candidate-1.2.0","ref":"candidate-1.2.0","sha":"2d157f3ebcaf4e9a1bc16721bd9b1632a6de5cda","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":22117259,"name":"Visualization","full_name":"hpcc-systems/Visualization","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/Visualization","description":"Common Visualization Components","fork":false,"url":"https://api.github.com/repos/hpcc-systems/Visualization","forks_url":"https://api.github.com/repos/hpcc-systems/Visualization/forks","keys_url":"https://api.github.com/repos/hpcc-systems/Visualization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/Visualization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/Visualization/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/Visualization/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/Visualization/events","assignees_url":"https://api.github.com/repos/hpcc-systems/Visualization/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/Visualization/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/Visualization/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/Visualization/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/Visualization/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/Visualization/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/Visualization/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/Visualization/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/Visualization/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/Visualization/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/Visualization/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcc-systems/Visualization/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/Visualization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/Visualization/merges","archive_url":"https://api.github.com/repos/hpcc-systems/Visualization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/Visualization/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/Visualization/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/Visualization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/Visualization/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/Visualization/releases{/id}","created_at":"2014-07-22T19:13:04Z","updated_at":"2015-06-07T23:12:01Z","pushed_at":"2015-06-12T19:30:39Z","git_url":"git://github.com/hpcc-systems/Visualization.git","ssh_url":"git@github.com:hpcc-systems/Visualization.git","clone_url":"https://github.com/hpcc-systems/Visualization.git","svn_url":"https://github.com/hpcc-systems/Visualization","homepage":"","size":13990,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":37,"forks":18,"open_issues":37,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493"},"html":{"href":"https://github.com/hpcc-systems/Visualization/pull/493"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/issues/493"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/issues/493/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/493/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/statuses/fe83a3eac82a07e65607d87101d8cb8ed3af8701"}}}}