{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/26086441","id":26086441,"diff_hunk":"@@ -303,83 +303,74 @@ return $.widget( \"ui.slider\", $.ui.mouse, {\n \t\treturn this._trimAlignValue( valueMouse );\n \t},\n \n-\t_start: function( event, index ) {\n+\t_createUiHash: function( index, value, values ) {\n \t\tvar uiHash = {\n \t\t\thandle: this.handles[ index ],\n-\t\t\tvalue: this.value()\n+\t\t\thandleIndex: index,\n+\t\t\tvalue: value || this.value()\n \t\t};\n-\t\tif ( this.options.values && this.options.values.length ) {\n-\t\t\tuiHash.value = this.values( index );\n-\t\t\tuiHash.values = this.values();\n+\n+\t\tif ( this._hasMultipleValues() ) {\n+\t\t\tuiHash.value = value || this.values( index );\n+\t\t\tuiHash.values = values || this.values();\n \t\t}\n+\n+\t\treturn uiHash;\n+\t},\n+\n+\t_hasMultipleValues: function() {\n+\t\treturn this.options.values && this.options.values.length;\n+\t},\n+\n+\t_start: function( event, index ) {\n+\t\tvar uiHash = this._createUiHash(index);\n \t\treturn this._trigger( \"start\", event, uiHash );\n \t},\n \n \t_slide: function( event, index, newVal ) {\n \t\tvar otherVal,\n-\t\t\tnewValues,\n+\t\t\tcurrentValue = this.value(),\n+\t\t\tnewValues = this.values(),\n \t\t\tallowed;\n \n-\t\tif ( this.options.values && this.options.values.length ) {\n+\t\tif ( this._hasMultipleValues() ) {\n \t\t\totherVal = this.values( index ? 0 : 1 );\n+\t\t\tcurrentValue = this.values( index );\n \n-\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) &&\n-\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n-\t\t\t\t) {\n-\t\t\t\tnewVal = otherVal;\n+\t\t\tif ( this.options.values.length === 2 && this.options.range === true ) {\n+\t\t\t\tnewVal =  index === 0 ? Math.min(otherVal, newVal) : Math.max(otherVal, newVal);","path":"ui/slider.js","position":50,"original_position":50,"commit_id":"e2bc272d83985b60ee232074006a9f630a7da9df","original_commit_id":"e2bc272d83985b60ee232074006a9f630a7da9df","user":{"login":"scottgonzalez","id":141167,"avatar_url":"https://avatars.githubusercontent.com/u/141167?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgonzalez","html_url":"https://github.com/scottgonzalez","followers_url":"https://api.github.com/users/scottgonzalez/followers","following_url":"https://api.github.com/users/scottgonzalez/following{/other_user}","gists_url":"https://api.github.com/users/scottgonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgonzalez/subscriptions","organizations_url":"https://api.github.com/users/scottgonzalez/orgs","repos_url":"https://api.github.com/users/scottgonzalez/repos","events_url":"https://api.github.com/users/scottgonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/scottgonzalez/received_events","type":"User","site_admin":false},"body":"spacing","created_at":"2015-03-09T23:18:42Z","updated_at":"2015-03-09T23:18:42Z","html_url":"https://github.com/jquery/jquery-ui/pull/1473#discussion_r26086441","pull_request_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473","_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/26086441"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1473#discussion_r26086441"},"pull_request":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473","id":30700172,"html_url":"https://github.com/jquery/jquery-ui/pull/1473","diff_url":"https://github.com/jquery/jquery-ui/pull/1473.diff","patch_url":"https://github.com/jquery/jquery-ui/pull/1473.patch","issue_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1473","number":1473,"state":"open","locked":false,"title":"Slider: Pass handle index to event","user":{"login":"atomiomi","id":9496650,"avatar_url":"https://avatars.githubusercontent.com/u/9496650?v=3","gravatar_id":"","url":"https://api.github.com/users/atomiomi","html_url":"https://github.com/atomiomi","followers_url":"https://api.github.com/users/atomiomi/followers","following_url":"https://api.github.com/users/atomiomi/following{/other_user}","gists_url":"https://api.github.com/users/atomiomi/gists{/gist_id}","starred_url":"https://api.github.com/users/atomiomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomiomi/subscriptions","organizations_url":"https://api.github.com/users/atomiomi/orgs","repos_url":"https://api.github.com/users/atomiomi/repos","events_url":"https://api.github.com/users/atomiomi/events{/privacy}","received_events_url":"https://api.github.com/users/atomiomi/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-07T09:10:51Z","updated_at":"2015-03-09T23:18:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"617da09dd868961a5b2866e71a975bf82e284620","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1473/comments","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/e2bc272d83985b60ee232074006a9f630a7da9df","head":{"label":"atomiomi:7630-pass-handle-index-to-event","ref":"7630-pass-handle-index-to-event","sha":"e2bc272d83985b60ee232074006a9f630a7da9df","user":{"login":"atomiomi","id":9496650,"avatar_url":"https://avatars.githubusercontent.com/u/9496650?v=3","gravatar_id":"","url":"https://api.github.com/users/atomiomi","html_url":"https://github.com/atomiomi","followers_url":"https://api.github.com/users/atomiomi/followers","following_url":"https://api.github.com/users/atomiomi/following{/other_user}","gists_url":"https://api.github.com/users/atomiomi/gists{/gist_id}","starred_url":"https://api.github.com/users/atomiomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomiomi/subscriptions","organizations_url":"https://api.github.com/users/atomiomi/orgs","repos_url":"https://api.github.com/users/atomiomi/repos","events_url":"https://api.github.com/users/atomiomi/events{/privacy}","received_events_url":"https://api.github.com/users/atomiomi/received_events","type":"User","site_admin":false},"repo":{"id":31802891,"name":"jquery-ui","full_name":"atomiomi/jquery-ui","owner":{"login":"atomiomi","id":9496650,"avatar_url":"https://avatars.githubusercontent.com/u/9496650?v=3","gravatar_id":"","url":"https://api.github.com/users/atomiomi","html_url":"https://github.com/atomiomi","followers_url":"https://api.github.com/users/atomiomi/followers","following_url":"https://api.github.com/users/atomiomi/following{/other_user}","gists_url":"https://api.github.com/users/atomiomi/gists{/gist_id}","starred_url":"https://api.github.com/users/atomiomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomiomi/subscriptions","organizations_url":"https://api.github.com/users/atomiomi/orgs","repos_url":"https://api.github.com/users/atomiomi/repos","events_url":"https://api.github.com/users/atomiomi/events{/privacy}","received_events_url":"https://api.github.com/users/atomiomi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atomiomi/jquery-ui","description":"The official jQuery user interface library.","fork":true,"url":"https://api.github.com/repos/atomiomi/jquery-ui","forks_url":"https://api.github.com/repos/atomiomi/jquery-ui/forks","keys_url":"https://api.github.com/repos/atomiomi/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atomiomi/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atomiomi/jquery-ui/teams","hooks_url":"https://api.github.com/repos/atomiomi/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/atomiomi/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/atomiomi/jquery-ui/events","assignees_url":"https://api.github.com/repos/atomiomi/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/atomiomi/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/atomiomi/jquery-ui/tags","blobs_url":"https://api.github.com/repos/atomiomi/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atomiomi/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atomiomi/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/atomiomi/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atomiomi/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/atomiomi/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/atomiomi/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/atomiomi/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/atomiomi/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/atomiomi/jquery-ui/subscription","commits_url":"https://api.github.com/repos/atomiomi/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/atomiomi/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/atomiomi/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/atomiomi/jquery-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/atomiomi/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/atomiomi/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atomiomi/jquery-ui/merges","archive_url":"https://api.github.com/repos/atomiomi/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atomiomi/jquery-ui/downloads","issues_url":"https://api.github.com/repos/atomiomi/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/atomiomi/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/atomiomi/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/atomiomi/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atomiomi/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/atomiomi/jquery-ui/releases{/id}","created_at":"2015-03-07T05:58:45Z","updated_at":"2015-03-07T05:58:49Z","pushed_at":"2015-03-07T09:17:13Z","git_url":"git://github.com/atomiomi/jquery-ui.git","ssh_url":"git@github.com:atomiomi/jquery-ui.git","clone_url":"https://github.com/atomiomi/jquery-ui.git","svn_url":"https://github.com/atomiomi/jquery-ui","homepage":"http://jqueryui.com/","size":46621,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"jquery:master","ref":"master","sha":"ea999e4776bb0fe67b1eff702f09fc5cb878bfe0","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":478996,"name":"jquery-ui","full_name":"jquery/jquery-ui","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery-ui","description":"The official jQuery user interface library.","fork":false,"url":"https://api.github.com/repos/jquery/jquery-ui","forks_url":"https://api.github.com/repos/jquery/jquery-ui/forks","keys_url":"https://api.github.com/repos/jquery/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery-ui/teams","hooks_url":"https://api.github.com/repos/jquery/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery-ui/events","assignees_url":"https://api.github.com/repos/jquery/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery-ui/tags","blobs_url":"https://api.github.com/repos/jquery/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery-ui/subscription","commits_url":"https://api.github.com/repos/jquery/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery-ui/merges","archive_url":"https://api.github.com/repos/jquery/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery-ui/downloads","issues_url":"https://api.github.com/repos/jquery/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery-ui/releases{/id}","created_at":"2010-01-19T14:40:34Z","updated_at":"2015-03-09T16:30:15Z","pushed_at":"2015-03-06T16:33:21Z","git_url":"git://github.com/jquery/jquery-ui.git","ssh_url":"git@github.com:jquery/jquery-ui.git","clone_url":"https://github.com/jquery/jquery-ui.git","svn_url":"https://github.com/jquery/jquery-ui","homepage":"http://jqueryui.com/","size":46621,"stargazers_count":8770,"watchers_count":8770,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3382,"mirror_url":null,"open_issues_count":19,"forks":3382,"open_issues":19,"watchers":8770,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1473"},"issue":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1473"},"comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1473/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1473/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery-ui/statuses/e2bc272d83985b60ee232074006a9f630a7da9df"}}}}