{"action":"created","issue":{"url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider/issues/24","repository_url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider","labels_url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider/issues/24/comments","events_url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider/issues/24/events","html_url":"https://github.com/kennethkalmer/ember-cli-nouislider/issues/24","id":145163161,"number":24,"title":"Default formatting functions break negative ranges","user":{"login":"Ramblurr","id":14830,"avatar_url":"https://avatars.githubusercontent.com/u/14830?v=3","gravatar_id":"","url":"https://api.github.com/users/Ramblurr","html_url":"https://github.com/Ramblurr","followers_url":"https://api.github.com/users/Ramblurr/followers","following_url":"https://api.github.com/users/Ramblurr/following{/other_user}","gists_url":"https://api.github.com/users/Ramblurr/gists{/gist_id}","starred_url":"https://api.github.com/users/Ramblurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ramblurr/subscriptions","organizations_url":"https://api.github.com/users/Ramblurr/orgs","repos_url":"https://api.github.com/users/Ramblurr/repos","events_url":"https://api.github.com/users/Ramblurr/events{/privacy}","received_events_url":"https://api.github.com/users/Ramblurr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-04-01T12:06:28Z","updated_at":"2017-02-27T19:37:36Z","closed_at":"2017-02-27T19:27:10Z","body":"The addon provides two default [format functions](https://github.com/kennethkalmer/ember-cli-nouislider/blob/773c52e2ba7d3cf344128d64501f57a866e6bced/addon/components/range-slider.js#L37) that by default just return the value they are passed. \n\nThis unfortunately breaks when a range has a negative component (e.g, min: -5, max: 5).\n\nThis is because nouislider's `setValues` function [casts the value to set the handle to into a string](https://github.com/leongersen/noUiSlider/blob/2fbb5e21809a27acdc5b8f5f2c09acc1c1c5197d/src/js/scope.js#L94) before calling `formatFrom`. However the expect the value returned from the format.from function to be a Number.\n\nBut, the result with this addon's default format functions is to return the string.\n\nIn my app overriding the formatFrom function to be something like the following fixed the issue.\n\n```\nformatFrom(value) {\n  return +value;\n}\n```\n\nI'm not sure if this issue is a bug per-se, as it is more of an unexpected behavior. If it doesn't require code changes, then at least adding a note to the documentation would be helpful.\n"},"comment":{"url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider/issues/comments/282827929","html_url":"https://github.com/kennethkalmer/ember-cli-nouislider/issues/24#issuecomment-282827929","issue_url":"https://api.github.com/repos/kennethkalmer/ember-cli-nouislider/issues/24","id":282827929,"user":{"login":"kennethkalmer","id":8756,"avatar_url":"https://avatars.githubusercontent.com/u/8756?v=3","gravatar_id":"","url":"https://api.github.com/users/kennethkalmer","html_url":"https://github.com/kennethkalmer","followers_url":"https://api.github.com/users/kennethkalmer/followers","following_url":"https://api.github.com/users/kennethkalmer/following{/other_user}","gists_url":"https://api.github.com/users/kennethkalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/kennethkalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennethkalmer/subscriptions","organizations_url":"https://api.github.com/users/kennethkalmer/orgs","repos_url":"https://api.github.com/users/kennethkalmer/repos","events_url":"https://api.github.com/users/kennethkalmer/events{/privacy}","received_events_url":"https://api.github.com/users/kennethkalmer/received_events","type":"User","site_admin":false},"created_at":"2017-02-27T19:37:36Z","updated_at":"2017-02-27T19:37:36Z","body":"v0.12.0 has just been released, thanks for your contributions!"}}
{"actor":{"display_login":"kennethkalmer"}}