Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 41 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | (function($, window) { |
||
2 | var baseFontSize = 16; |
||
3 | |||
4 | window.StateManager.init([ |
||
5 | { |
||
6 | state: 'xs', |
||
7 | enter: 0, |
||
8 | exit: 575 / baseFontSize // 575px |
||
9 | }, |
||
10 | { |
||
11 | state: 'sm', |
||
12 | enter: 576 / baseFontSize, |
||
13 | exit: 767 / baseFontSize // 767px |
||
14 | }, |
||
15 | { |
||
16 | state: 'md', |
||
17 | enter: 768 / baseFontSize, // 768px |
||
18 | exit: 991 / baseFontSize // 991px |
||
19 | }, |
||
20 | { |
||
21 | state: 'lg', |
||
22 | enter: 992 / baseFontSize, // 992px |
||
23 | exit: 1199 / baseFontSize // 1199px |
||
24 | }, |
||
25 | { |
||
26 | state: 'xl', |
||
27 | enter: 1200 / baseFontSize, // 1200px |
||
28 | exit: 5160 / baseFontSize // 5160px |
||
29 | } |
||
30 | ]); |
||
31 | |||
32 | window.StateManager.addPlugin('body', 'ocHelloWorld'); |
||
33 | |||
34 | window.StateManager.registerListener([{ |
||
35 | state: '*', |
||
36 | enter: function(event) { |
||
37 | console.debug(event.exiting + ' => ' + event.entering); |
||
38 | } |
||
39 | }]); |
||
40 | |||
41 | })(jQuery, window); |
||
42 |