{"action":"created","issue":{"url":"https://api.github.com/repos/cugos/dropchop/issues/224","labels_url":"https://api.github.com/repos/cugos/dropchop/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/cugos/dropchop/issues/224/comments","events_url":"https://api.github.com/repos/cugos/dropchop/issues/224/events","html_url":"https://github.com/cugos/dropchop/pull/224","id":114192970,"number":224,"title":"Sort available turf functions when layer is selected. Closes #207.","user":{"login":"jczaplew","id":1739551,"avatar_url":"https://avatars.githubusercontent.com/u/1739551?v=3","gravatar_id":"","url":"https://api.github.com/users/jczaplew","html_url":"https://github.com/jczaplew","followers_url":"https://api.github.com/users/jczaplew/followers","following_url":"https://api.github.com/users/jczaplew/following{/other_user}","gists_url":"https://api.github.com/users/jczaplew/gists{/gist_id}","starred_url":"https://api.github.com/users/jczaplew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jczaplew/subscriptions","organizations_url":"https://api.github.com/users/jczaplew/orgs","repos_url":"https://api.github.com/users/jczaplew/repos","events_url":"https://api.github.com/users/jczaplew/events{/privacy}","received_events_url":"https://api.github.com/users/jczaplew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-30T03:34:14Z","updated_at":"2015-10-31T20:23:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cugos/dropchop/pulls/224","html_url":"https://github.com/cugos/dropchop/pull/224","diff_url":"https://github.com/cugos/dropchop/pull/224.diff","patch_url":"https://github.com/cugos/dropchop/pull/224.patch"},"body":"So jQuery. Much wow.\r\n\r\nPer #207, sort the available geometry functions by availability and alphabetically when a layer is selected. Added a function `_sortGeo` that does the sorting by selecting the buttons and sorting them all alphabetically, then reattaching the active functions followed by the inactive ones. \r\n\r\nIf we were to ever add underscore as dependency this could be cleaned up by using a chained `_.sortBy`. Also, there is probably a fancy sorting function you could write to do this all at once, but alas, after playing with a bunch of convoluted methods this worked best and I think is easy to read. "},"comment":{"url":"https://api.github.com/repos/cugos/dropchop/issues/comments/152768238","html_url":"https://github.com/cugos/dropchop/pull/224#issuecomment-152768238","issue_url":"https://api.github.com/repos/cugos/dropchop/issues/224","id":152768238,"user":{"login":"jczaplew","id":1739551,"avatar_url":"https://avatars.githubusercontent.com/u/1739551?v=3","gravatar_id":"","url":"https://api.github.com/users/jczaplew","html_url":"https://github.com/jczaplew","followers_url":"https://api.github.com/users/jczaplew/followers","following_url":"https://api.github.com/users/jczaplew/following{/other_user}","gists_url":"https://api.github.com/users/jczaplew/gists{/gist_id}","starred_url":"https://api.github.com/users/jczaplew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jczaplew/subscriptions","organizations_url":"https://api.github.com/users/jczaplew/orgs","repos_url":"https://api.github.com/users/jczaplew/repos","events_url":"https://api.github.com/users/jczaplew/events{/privacy}","received_events_url":"https://api.github.com/users/jczaplew/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T20:23:58Z","updated_at":"2015-10-31T20:23:58Z","body":"I reran the Travis CI pr and things passed, even though the same error was thrown as the first time. All the tests passed both times, so I'm not sure what the deal is there.\r\n\r\nAs for the codeship tests, I'm unable to see what went wrong there."}}