{"action":"created","issue":{"url":"https://api.github.com/repos/IonDen/ion.rangeSlider/issues/266","labels_url":"https://api.github.com/repos/IonDen/ion.rangeSlider/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/IonDen/ion.rangeSlider/issues/266/comments","events_url":"https://api.github.com/repos/IonDen/ion.rangeSlider/issues/266/events","html_url":"https://github.com/IonDen/ion.rangeSlider/issues/266","id":93186015,"number":266,"title":"События сладера","user":{"login":"panasyuk","id":2225551,"avatar_url":"https://avatars.githubusercontent.com/u/2225551?v=3","gravatar_id":"","url":"https://api.github.com/users/panasyuk","html_url":"https://github.com/panasyuk","followers_url":"https://api.github.com/users/panasyuk/followers","following_url":"https://api.github.com/users/panasyuk/following{/other_user}","gists_url":"https://api.github.com/users/panasyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/panasyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panasyuk/subscriptions","organizations_url":"https://api.github.com/users/panasyuk/orgs","repos_url":"https://api.github.com/users/panasyuk/repos","events_url":"https://api.github.com/users/panasyuk/events{/privacy}","received_events_url":"https://api.github.com/users/panasyuk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IonDen/ion.rangeSlider/labels/Question","name":"Question","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"IonDen","id":428365,"avatar_url":"https://avatars.githubusercontent.com/u/428365?v=3","gravatar_id":"","url":"https://api.github.com/users/IonDen","html_url":"https://github.com/IonDen","followers_url":"https://api.github.com/users/IonDen/followers","following_url":"https://api.github.com/users/IonDen/following{/other_user}","gists_url":"https://api.github.com/users/IonDen/gists{/gist_id}","starred_url":"https://api.github.com/users/IonDen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IonDen/subscriptions","organizations_url":"https://api.github.com/users/IonDen/orgs","repos_url":"https://api.github.com/users/IonDen/repos","events_url":"https://api.github.com/users/IonDen/events{/privacy}","received_events_url":"https://api.github.com/users/IonDen/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-07-06T04:43:48Z","updated_at":"2015-07-06T09:23:11Z","closed_at":null,"body":"Здравствуйте.\r\nНаткнулся на вот такую историю:\r\nПри инициализации срабатывает событие START. Честно говоря, я ожидал, что onStart будет работать, когда я начну таскать хэндл.\r\nС другой стороны, начало перетаскивания хэндла можно отследить по срабатыванию CHANGE, а окончание изменения по событию FINISH. Но (в version 2.0.11 Build: 327) сразу после FINISH сдледует опять CHANGE. И из-за этого приходится городить код, который запомнит, что перед текущим CHANGE был FINISH и событию CHANGE срабатывать необязательно.\r\nПодобная неоднозначность рождает и другие аномалии в коде.\r\nСчитаю правильным следующий способ генерации событий:\r\nSTART - только в начале перетаскивания хэндла\r\nCHANGE - при каждом изменении позиции хэндла\r\nFINISH - только в конце перетаскивания\r\nUPDATE - только при изменении значения программно"},"comment":{"url":"https://api.github.com/repos/IonDen/ion.rangeSlider/issues/comments/118784281","html_url":"https://github.com/IonDen/ion.rangeSlider/issues/266#issuecomment-118784281","issue_url":"https://api.github.com/repos/IonDen/ion.rangeSlider/issues/266","id":118784281,"user":{"login":"panasyuk","id":2225551,"avatar_url":"https://avatars.githubusercontent.com/u/2225551?v=3","gravatar_id":"","url":"https://api.github.com/users/panasyuk","html_url":"https://github.com/panasyuk","followers_url":"https://api.github.com/users/panasyuk/followers","following_url":"https://api.github.com/users/panasyuk/following{/other_user}","gists_url":"https://api.github.com/users/panasyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/panasyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panasyuk/subscriptions","organizations_url":"https://api.github.com/users/panasyuk/orgs","repos_url":"https://api.github.com/users/panasyuk/repos","events_url":"https://api.github.com/users/panasyuk/events{/privacy}","received_events_url":"https://api.github.com/users/panasyuk/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T09:23:11Z","updated_at":"2015-07-06T09:23:11Z","body":"Проверил еще раз:\r\n```javascript\r\n# код\r\n$(\"#range_43\").ionRangeSlider({\r\n    type: \"single\",\r\n    min: 0,\r\n    max: 100,\r\n    from: 50,\r\n    keyboard: true,\r\n    onStart: function (data) {\r\n        console.log(\"onStart\");\r\n    },\r\n    onChange: function (data) {\r\n        console.log(\"onChange\");\r\n    },\r\n    onFinish: function (data) {\r\n        console.log(\"onFinish\");\r\n    },\r\n    onUpdate: function (data) {\r\n        console.log(\"onUpdate\");\r\n    }\r\n});\r\n```\r\n```\r\n# вывод\r\n(23) onChange # Двигаю хэндл\r\nonFinish # Отпускаю хэндл\r\nonChange\r\n(21) onChange # Двигаю хэндл\r\nonFinish # Отпускаю хэндл\r\nonChange\r\n(18) onChange # Двигаю хэндл\r\nonFinish # Отпускаю хэндл\r\nonChange\r\n```\r\nНо если кликать на линейку, то сначала onChange, а потом onFinish."}}