diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-14 16:02:40 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-14 16:02:40 +0300 |
commit | a965b03369594736d586f5a04a14de4451b9edd1 (patch) | |
tree | e2105850385e02f286e18fd73bd0392f71c3c35a /app/assets/javascripts/breakpoints.coffee | |
parent | 1a5992b5eb15a58223925877e90f7642aac6ce2d (diff) |
Removed call to setup from breakpoint size method
Diffstat (limited to 'app/assets/javascripts/breakpoints.coffee')
-rw-r--r-- | app/assets/javascripts/breakpoints.coffee | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/breakpoints.coffee b/app/assets/javascripts/breakpoints.coffee index 73a42d99982..1ffaaddb055 100644 --- a/app/assets/javascripts/breakpoints.coffee +++ b/app/assets/javascripts/breakpoints.coffee @@ -14,12 +14,11 @@ class @Breakpoints return if $(allDeviceSelector.join(",")).length # Create all the elements - $.each BREAKPOINTS, (i, breakpoint) -> - $("body").append "<div class='device-#{breakpoint} visible-#{breakpoint}'></div>" + els = $.map BREAKPOINTS, (breakpoint) -> + "<div class='device-#{breakpoint} visible-#{breakpoint}'></div>" + $("body").append els.join('') getBreakpointSize: -> - @setup() - allDeviceSelector = BREAKPOINTS.map (breakpoint) -> ".device-#{breakpoint}" @@ -30,4 +29,5 @@ class @Breakpoints @get: -> return instance ?= new BreakpointInstance -@bp = Breakpoints.get() +$ => + @bp = Breakpoints.get() |