Function
getGutterSize
(gutterSize, isFirst, isLast, gutterAlign)
Source from the content-addressed store, hash-verified
| 70 | }; |
| 71 | |
| 72 | var getGutterSize = function (gutterSize, isFirst, isLast, gutterAlign) { |
| 73 | if (isFirst) { |
| 74 | if (gutterAlign === 'end') { |
| 75 | return 0 |
| 76 | } |
| 77 | if (gutterAlign === 'center') { |
| 78 | return gutterSize / 2 |
| 79 | } |
| 80 | } else if (isLast) { |
| 81 | if (gutterAlign === 'start') { |
| 82 | return 0 |
| 83 | } |
| 84 | if (gutterAlign === 'center') { |
| 85 | return gutterSize / 2 |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | return gutterSize |
| 90 | }; |
| 91 | |
| 92 | // Default options |
| 93 | var defaultGutterFn = function (i, gutterDirection) { |
Tested by
no test coverage detected