{"action":"created","issue":{"url":"https://api.github.com/repos/creativeaura/threesixty-slider/issues/81","repository_url":"https://api.github.com/repos/creativeaura/threesixty-slider","labels_url":"https://api.github.com/repos/creativeaura/threesixty-slider/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/creativeaura/threesixty-slider/issues/81/comments","events_url":"https://api.github.com/repos/creativeaura/threesixty-slider/issues/81/events","html_url":"https://github.com/creativeaura/threesixty-slider/issues/81","id":119094829,"number":81,"title":"Slider freezes on first slide when disableWrap option is set to true","user":{"login":"joshas","id":79141,"avatar_url":"https://avatars.githubusercontent.com/u/79141?v=3","gravatar_id":"","url":"https://api.github.com/users/joshas","html_url":"https://github.com/joshas","followers_url":"https://api.github.com/users/joshas/followers","following_url":"https://api.github.com/users/joshas/following{/other_user}","gists_url":"https://api.github.com/users/joshas/gists{/gist_id}","starred_url":"https://api.github.com/users/joshas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshas/subscriptions","organizations_url":"https://api.github.com/users/joshas/orgs","repos_url":"https://api.github.com/users/joshas/repos","events_url":"https://api.github.com/users/joshas/events{/privacy}","received_events_url":"https://api.github.com/users/joshas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-26T19:30:08Z","updated_at":"2016-06-14T02:59:24Z","closed_at":null,"body":"Using latest version from repository (2.0.5). Added option disableWrap: true. When spinning with autoplay or manually, slider freezes on reaching first image. Error message:\r\n````\r\nTypeError: f[e.getNormalizedCurrentFrame(...)] is undefined\r\n````\r\nHere's an example to quickly reproduce this issue:\r\nhttps://jsfiddle.net/joshas/5vaenw0s/2/\r\n\r\nFrames array is being accessed using values starting from 1, not from 0."},"comment":{"url":"https://api.github.com/repos/creativeaura/threesixty-slider/issues/comments/225767290","html_url":"https://github.com/creativeaura/threesixty-slider/issues/81#issuecomment-225767290","issue_url":"https://api.github.com/repos/creativeaura/threesixty-slider/issues/81","id":225767290,"user":{"login":"vemacs","id":2669187,"avatar_url":"https://avatars.githubusercontent.com/u/2669187?v=3","gravatar_id":"","url":"https://api.github.com/users/vemacs","html_url":"https://github.com/vemacs","followers_url":"https://api.github.com/users/vemacs/followers","following_url":"https://api.github.com/users/vemacs/following{/other_user}","gists_url":"https://api.github.com/users/vemacs/gists{/gist_id}","starred_url":"https://api.github.com/users/vemacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vemacs/subscriptions","organizations_url":"https://api.github.com/users/vemacs/orgs","repos_url":"https://api.github.com/users/vemacs/repos","events_url":"https://api.github.com/users/vemacs/events{/privacy}","received_events_url":"https://api.github.com/users/vemacs/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T02:59:24Z","updated_at":"2016-06-14T02:59:24Z","body":"@larzuk91's suggestion didn't work either. I fixed this by modifying the library:\r\n\r\n    base.getNormalizedCurrentFrame = function () {\r\n      var c, e;\r\n\r\n      if ( !AppConfig.disableWrap ) {\r\n        c = Math.ceil(AppConfig.currentFrame % AppConfig.totalFrames);\r\n        if (c < 0) {\r\n          c += AppConfig.totalFrames - (AppConfig.zeroBased ? 1 : 0);\r\n        }\r\n      } else {\r\n        c = Math.min(AppConfig.currentFrame, AppConfig.totalFrames - (AppConfig.zeroBased ? 1 : 0));\r\n        e = Math.min(AppConfig.endFrame, AppConfig.totalFrames - (AppConfig.zeroBased ? 1 : 0));\r\n        c = Math.max(c, (AppConfig.zeroBased ? 0 : 1));\r\n        e = Math.max(e, (AppConfig.zeroBased ? 0 : 1));\r\n        if (c == AppConfig.totalFrames) {\r\n          c--;\r\n        }\r\n        AppConfig.currentFrame = c;\r\n        AppConfig.endFrame = e;\r\n      }\r\n      return c;\r\n    };\r\n"}}
{"actor":{"display_login":"vemacs"}}