{"action":"closed","issue":{"url":"https://api.github.com/repos/phetsims/scenery-phet/issues/252","repository_url":"https://api.github.com/repos/phetsims/scenery-phet","labels_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/252/comments","events_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/252/events","html_url":"https://github.com/phetsims/scenery-phet/issues/252","id":169701555,"number":252,"title":"NumberControl: distinct values for tweaker increment and slider constraint","user":{"login":"veillette","id":7633344,"avatar_url":"https://avatars.githubusercontent.com/u/7633344?v=3","gravatar_id":"","url":"https://api.github.com/users/veillette","html_url":"https://github.com/veillette","followers_url":"https://api.github.com/users/veillette/followers","following_url":"https://api.github.com/users/veillette/following{/other_user}","gists_url":"https://api.github.com/users/veillette/gists{/gist_id}","starred_url":"https://api.github.com/users/veillette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veillette/subscriptions","organizations_url":"https://api.github.com/users/veillette/orgs","repos_url":"https://api.github.com/users/veillette/repos","events_url":"https://api.github.com/users/veillette/events{/privacy}","received_events_url":"https://api.github.com/users/veillette/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"veillette","id":7633344,"avatar_url":"https://avatars.githubusercontent.com/u/7633344?v=3","gravatar_id":"","url":"https://api.github.com/users/veillette","html_url":"https://github.com/veillette","followers_url":"https://api.github.com/users/veillette/followers","following_url":"https://api.github.com/users/veillette/following{/other_user}","gists_url":"https://api.github.com/users/veillette/gists{/gist_id}","starred_url":"https://api.github.com/users/veillette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veillette/subscriptions","organizations_url":"https://api.github.com/users/veillette/orgs","repos_url":"https://api.github.com/users/veillette/repos","events_url":"https://api.github.com/users/veillette/events{/privacy}","received_events_url":"https://api.github.com/users/veillette/received_events","type":"User","site_admin":false},"assignees":[{"login":"veillette","id":7633344,"avatar_url":"https://avatars.githubusercontent.com/u/7633344?v=3","gravatar_id":"","url":"https://api.github.com/users/veillette","html_url":"https://github.com/veillette","followers_url":"https://api.github.com/users/veillette/followers","following_url":"https://api.github.com/users/veillette/following{/other_user}","gists_url":"https://api.github.com/users/veillette/gists{/gist_id}","starred_url":"https://api.github.com/users/veillette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veillette/subscriptions","organizations_url":"https://api.github.com/users/veillette/orgs","repos_url":"https://api.github.com/users/veillette/repos","events_url":"https://api.github.com/users/veillette/events{/privacy}","received_events_url":"https://api.github.com/users/veillette/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-08-05T21:38:35Z","updated_at":"2016-08-11T17:41:29Z","closed_at":"2016-08-11T17:41:29Z","body":"In the process of thinking about generalizing the layout of NumberControl (#217), we need to generalize some options to accommodate them within NumberControl.\r\n\r\nNumberControl has an option called delta that controls (1) the increment of the tweakers, and (2)  the thumb on the slider via,\r\n\r\n```\r\n    var slider = new HSlider( numberProperty, numberRange, _.extend( {\r\n      startDrag: options.startCallback,\r\n      endDrag: options.endCallback,\r\n      constrainValue: function( value ) {\r\n        // constrain to delta\r\n        value = Util.roundSymmetric( value / options.delta ) * options.delta;\r\n        // constrain to range\r\n        return numberRange.constrainValue( value );\r\n      })\r\n\r\n```\r\n\r\nThe custom made NumberControl in pendulumLab uses two different values.   \r\n![image](https://cloud.githubusercontent.com/assets/7633344/17451127/68214db8-5b32-11e6-97e9-7e436171a6d9.png)\r\n\r\nFor instance, the length of the pendulumcan be incremented by 0.01 meter through the tweakers, whereas the slider is constrained to rounded to 0.10 meter.  I think the idea was to use the tweaker to get the high-precision.\r\n\r\n\r\n"}}
{"actor":{"display_login":"veillette"}}