{"action":"created","issue":{"url":"https://api.github.com/repos/Wlada/vue-carousel-3d/issues/23","repository_url":"https://api.github.com/repos/Wlada/vue-carousel-3d","labels_url":"https://api.github.com/repos/Wlada/vue-carousel-3d/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/Wlada/vue-carousel-3d/issues/23/comments","events_url":"https://api.github.com/repos/Wlada/vue-carousel-3d/issues/23/events","html_url":"https://github.com/Wlada/vue-carousel-3d/pull/23","id":228256630,"number":23,"title":"Callbacks through emit","user":{"login":"AmazingDreams","id":743155,"avatar_url":"https://avatars1.githubusercontent.com/u/743155?v=3","gravatar_id":"","url":"https://api.github.com/users/AmazingDreams","html_url":"https://github.com/AmazingDreams","followers_url":"https://api.github.com/users/AmazingDreams/followers","following_url":"https://api.github.com/users/AmazingDreams/following{/other_user}","gists_url":"https://api.github.com/users/AmazingDreams/gists{/gist_id}","starred_url":"https://api.github.com/users/AmazingDreams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmazingDreams/subscriptions","organizations_url":"https://api.github.com/users/AmazingDreams/orgs","repos_url":"https://api.github.com/users/AmazingDreams/repos","events_url":"https://api.github.com/users/AmazingDreams/events{/privacy}","received_events_url":"https://api.github.com/users/AmazingDreams/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-12T10:51:06Z","updated_at":"2017-05-12T11:09:17Z","closed_at":"2017-05-12T11:06:51Z","pull_request":{"url":"https://api.github.com/repos/Wlada/vue-carousel-3d/pulls/23","html_url":"https://github.com/Wlada/vue-carousel-3d/pull/23","diff_url":"https://github.com/Wlada/vue-carousel-3d/pull/23.diff","patch_url":"https://github.com/Wlada/vue-carousel-3d/pull/23.patch"},"body":"I think the default way to handle callbacks in Vue are through event emission. Furthermore I needed a way to respond to a slide change when it starts, not when it ends. So I made these few changes.\r\n\r\nI added deprecation warnings instead of removing the old methods so as not to break anything. They are logged when `callback !== noop` Transitioning for existing users should be simple. ex:\r\n\r\n```vue\r\n<!-- Now -->\r\n<carousel-3d :onSlideChange=\"onSlideChange\"\r\n             :onLastSlide=\"onLastSlide\">\r\n\r\n<!-- Becomes -->\r\n<carousel-3d @afterSlideChanged=\"onAfterSlideChanged\"\r\n             @lastSlide=\"onLastSlide\"\r\n             @slideChange=\"onSlideChange\"> <!-- new event -->\r\n```\r\n\r\nAs you can see there are some ambiguity issues because of the naming chosen in the past. `onSlideChange` is triggered before/at the moment your slider starts changing whilst the previous `onSlideChanged` is triggered after the animation occured. Therefore I renamed it to `onAfterSlideChanged` so there is a clearer distinction.\r\n\r\nLet me know if this needs some more work."},"comment":{"url":"https://api.github.com/repos/Wlada/vue-carousel-3d/issues/comments/301049429","html_url":"https://github.com/Wlada/vue-carousel-3d/pull/23#issuecomment-301049429","issue_url":"https://api.github.com/repos/Wlada/vue-carousel-3d/issues/23","id":301049429,"user":{"login":"Wlada","id":1298077,"avatar_url":"https://avatars3.githubusercontent.com/u/1298077?v=3","gravatar_id":"","url":"https://api.github.com/users/Wlada","html_url":"https://github.com/Wlada","followers_url":"https://api.github.com/users/Wlada/followers","following_url":"https://api.github.com/users/Wlada/following{/other_user}","gists_url":"https://api.github.com/users/Wlada/gists{/gist_id}","starred_url":"https://api.github.com/users/Wlada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wlada/subscriptions","organizations_url":"https://api.github.com/users/Wlada/orgs","repos_url":"https://api.github.com/users/Wlada/repos","events_url":"https://api.github.com/users/Wlada/events{/privacy}","received_events_url":"https://api.github.com/users/Wlada/received_events","type":"User","site_admin":false},"created_at":"2017-05-12T11:09:17Z","updated_at":"2017-05-12T11:09:17Z","body":"Thanks for this! Code merged into master branch"}}
{"actor":{"display_login":"Wlada"}}