{"action":"created","issue":{"url":"https://api.github.com/repos/metafizzy/flickity/issues/95","labels_url":"https://api.github.com/repos/metafizzy/flickity/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/metafizzy/flickity/issues/95/comments","events_url":"https://api.github.com/repos/metafizzy/flickity/issues/95/events","html_url":"https://github.com/metafizzy/flickity/issues/95","id":64272818,"number":95,"title":"wrapAround when content width smaller than container","user":{"login":"komunyako","id":10860376,"avatar_url":"https://avatars.githubusercontent.com/u/10860376?v=3","gravatar_id":"","url":"https://api.github.com/users/komunyako","html_url":"https://github.com/komunyako","followers_url":"https://api.github.com/users/komunyako/followers","following_url":"https://api.github.com/users/komunyako/following{/other_user}","gists_url":"https://api.github.com/users/komunyako/gists{/gist_id}","starred_url":"https://api.github.com/users/komunyako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komunyako/subscriptions","organizations_url":"https://api.github.com/users/komunyako/orgs","repos_url":"https://api.github.com/users/komunyako/repos","events_url":"https://api.github.com/users/komunyako/events{/privacy}","received_events_url":"https://api.github.com/users/komunyako/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/metafizzy/flickity/labels/feature%20request","name":"feature request","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-25T13:46:57Z","updated_at":"2015-12-10T14:44:40Z","closed_at":"2015-06-08T13:44:15Z","body":"If you set `wrapAround: true` and have small amount of items that don't fill container -- then it causing trouble. See this [pin](http://codepen.io/anon/pen/ogmdaK), try remove some items and scroll slider.\r\n\r\nI'm suggestion add condition to `_getWrapShiftCells` method that will check widths\r\n``` js\r\n  // cancel wrap-around if content smaller than container\r\n  var lastCell = this.getLastCell();\r\n  var contentWidth = this.slideableWidth - lastCell.size[ this.options.rightToLeft ? 'marginLeft' : 'marginRight' ];\r\n  if ( contentWidth <= this.size.innerWidth ) {\r\n    this.options.wrapAround = false;\r\n  } else {\r\n    this.options.wrapAround = true;\r\n  }\r\n```\r\n[Look at it](http://codepen.io/anon/pen/ZYwoPj). Is it right way?"},"comment":{"url":"https://api.github.com/repos/metafizzy/flickity/issues/comments/163644772","html_url":"https://github.com/metafizzy/flickity/issues/95#issuecomment-163644772","issue_url":"https://api.github.com/repos/metafizzy/flickity/issues/95","id":163644772,"user":{"login":"piotrkulpinski","id":358412,"avatar_url":"https://avatars.githubusercontent.com/u/358412?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrkulpinski","html_url":"https://github.com/piotrkulpinski","followers_url":"https://api.github.com/users/piotrkulpinski/followers","following_url":"https://api.github.com/users/piotrkulpinski/following{/other_user}","gists_url":"https://api.github.com/users/piotrkulpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrkulpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrkulpinski/subscriptions","organizations_url":"https://api.github.com/users/piotrkulpinski/orgs","repos_url":"https://api.github.com/users/piotrkulpinski/repos","events_url":"https://api.github.com/users/piotrkulpinski/events{/privacy}","received_events_url":"https://api.github.com/users/piotrkulpinski/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T14:44:40Z","updated_at":"2015-12-10T14:44:40Z","body":"+1"}}