{"action":"created","issue":{"url":"https://api.github.com/repos/phetsims/scenery-phet/issues/255","repository_url":"https://api.github.com/repos/phetsims/scenery-phet","labels_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/255/comments","events_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/255/events","html_url":"https://github.com/phetsims/scenery-phet/issues/255","id":170260213,"number":255,"title":"NumberControl passes all of its options to HSlider","user":{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phetsims/scenery-phet/labels/type:bug","name":"type:bug","color":"FF00AA"}],"state":"open","locked":false,"assignee":{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false},"assignees":[{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-08-09T20:17:16Z","updated_at":"2016-08-18T21:32:06Z","closed_at":null,"body":"Noted while working on https://github.com/phetsims/scenery-phet/issues/252.\r\n\r\nNumberControl is passing all of its options to HSlider. See line 140:\r\n\r\n```js\r\n    var slider = new HSlider( numberProperty, numberRange, _.extend( {\r\n      startDrag: options.startCallback,\r\n      endDrag: options.endCallback,\r\n      constrainValue: options.constrainValue\r\n    }, options, {\r\n\r\n      // This uses a 3-arg extend so that the tandem is overriden properly\r\n      tandem: options.tandem && options.tandem.createTandem( 'slider' )\r\n    } ) );\r\n```\r\n\r\nThis makes it virtually impossible to use layout or scaling options with NumberControl, since passing them to HSlider will cause those options to also be applied to the HSlider.  [EDIT: ... which is why I've labeled this as \"bug\".]\r\n\r\nInvestigate using `_.pick` to extract the options that are relevant to HSlider."},"comment":{"url":"https://api.github.com/repos/phetsims/scenery-phet/issues/comments/240863753","html_url":"https://github.com/phetsims/scenery-phet/issues/255#issuecomment-240863753","issue_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/255","id":240863753,"user":{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T21:32:06Z","updated_at":"2016-08-18T21:32:06Z","body":"Ah... There was a reason why the `_.extend` call was necessary for sliderOptions.  It's because NumberControl sets some defaults for its HSlider.  If the client passes in its own `sliderOptions`, it will blow away all of those defaults, not just the ones that it wants to override."}}
{"actor":{"display_login":"pixelzoom"}}