{"action":"created","issue":{"url":"https://api.github.com/repos/sheikalthaf/ngu-carousel/issues/21","repository_url":"https://api.github.com/repos/sheikalthaf/ngu-carousel","labels_url":"https://api.github.com/repos/sheikalthaf/ngu-carousel/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/sheikalthaf/ngu-carousel/issues/21/comments","events_url":"https://api.github.com/repos/sheikalthaf/ngu-carousel/issues/21/events","html_url":"https://github.com/sheikalthaf/ngu-carousel/issues/21","id":300666990,"number":21,"title":"Experiencing a browser crash while using fixed tile width and when the component is collapsed","user":{"login":"puneetg1983","id":5299838,"avatar_url":"https://avatars0.githubusercontent.com/u/5299838?v=4","gravatar_id":"","url":"https://api.github.com/users/puneetg1983","html_url":"https://github.com/puneetg1983","followers_url":"https://api.github.com/users/puneetg1983/followers","following_url":"https://api.github.com/users/puneetg1983/following{/other_user}","gists_url":"https://api.github.com/users/puneetg1983/gists{/gist_id}","starred_url":"https://api.github.com/users/puneetg1983/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puneetg1983/subscriptions","organizations_url":"https://api.github.com/users/puneetg1983/orgs","repos_url":"https://api.github.com/users/puneetg1983/repos","events_url":"https://api.github.com/users/puneetg1983/events{/privacy}","received_events_url":"https://api.github.com/users/puneetg1983/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-27T15:06:43Z","updated_at":"2018-03-01T16:57:54Z","closed_at":null,"author_association":"NONE","body":"I am trying to use this component in a collapsible container and when the component is collapsed, it is causing chrome to crash because of this line of code\r\n\r\n`this.pointIndex = Math.ceil(Nos / this.data.slideItems);`\r\n\r\nWhat is happening is that `this.data.slideItems` has value zero which causes `this.pointIndex` to have an infinite value and the loop just after this runs forever and causes the crash.\r\n\r\nThe problem is happening in case of fixed width tile scenarios and only when they are collapsed because in that case the below statement assigns this.data.items to 0 as  this.data.carouselWidth is zero because the component is in a collapsed state\r\n\r\n`this.data.items = Math.trunc(\r\n        this.data.carouselWidth / this.userData.grid.all`\r\n\r\nand that causes the below piece of code to assign this.data.slideItems to zero\r\n\r\n`this.data.slideItems = +(this.userData.slide < this.data.items\r\n      ? this.userData.slide\r\n      : this.data.items);`\r\n\r\n(In my case userData.slide was 1 but this.data.items turned out to be zero)\r\n\r\nIt was a bit hard to track in my application as I am trying to reuse your component multiple times on a page and expanding \\ collapsing based on user choice.\r\n\r\nHoping this makes sense and that the fix is easy and it is available soon..."},"comment":{"url":"https://api.github.com/repos/sheikalthaf/ngu-carousel/issues/comments/369658012","html_url":"https://github.com/sheikalthaf/ngu-carousel/issues/21#issuecomment-369658012","issue_url":"https://api.github.com/repos/sheikalthaf/ngu-carousel/issues/21","id":369658012,"user":{"login":"sheikalthaf","id":22526247,"avatar_url":"https://avatars0.githubusercontent.com/u/22526247?v=4","gravatar_id":"","url":"https://api.github.com/users/sheikalthaf","html_url":"https://github.com/sheikalthaf","followers_url":"https://api.github.com/users/sheikalthaf/followers","following_url":"https://api.github.com/users/sheikalthaf/following{/other_user}","gists_url":"https://api.github.com/users/sheikalthaf/gists{/gist_id}","starred_url":"https://api.github.com/users/sheikalthaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheikalthaf/subscriptions","organizations_url":"https://api.github.com/users/sheikalthaf/orgs","repos_url":"https://api.github.com/users/sheikalthaf/repos","events_url":"https://api.github.com/users/sheikalthaf/events{/privacy}","received_events_url":"https://api.github.com/users/sheikalthaf/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T16:57:54Z","updated_at":"2018-03-01T16:57:54Z","author_association":"OWNER","body":"Thanks for the source. I will check and update the carousel."}}
{"actor":{"display_login":"sheikalthaf"}}