OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('print_preview.ticket_items', function() { | 5 cr.define('print_preview.ticket_items', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Custom page margins ticket item whose value is a | 9 * Custom page margins ticket item whose value is a |
10 * {@code print_preview.Margins}. | 10 * {@code print_preview.Margins}. |
(...skipping 19 matching lines...) Expand all Loading... |
30 */ | 30 */ |
31 CustomMargins.Orientation = { | 31 CustomMargins.Orientation = { |
32 TOP: 'top', | 32 TOP: 'top', |
33 RIGHT: 'right', | 33 RIGHT: 'right', |
34 BOTTOM: 'bottom', | 34 BOTTOM: 'bottom', |
35 LEFT: 'left' | 35 LEFT: 'left' |
36 }; | 36 }; |
37 | 37 |
38 /** | 38 /** |
39 * Mapping of a margin orientation to its opposite. | 39 * Mapping of a margin orientation to its opposite. |
40 * @type {!Object.<!CustomMargins.Orientation, !CustomMargins.Orientation>} | 40 * @type {!Object.<!print_preview.ticket_items.CustomMargins.Orientation, |
| 41 * !print_preview.ticket_items.CustomMargins.Orientation>} |
41 * @private | 42 * @private |
42 */ | 43 */ |
43 CustomMargins.OppositeOrientation_ = {}; | 44 CustomMargins.OppositeOrientation_ = {}; |
44 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.TOP] = | 45 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.TOP] = |
45 CustomMargins.Orientation.BOTTOM; | 46 CustomMargins.Orientation.BOTTOM; |
46 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.RIGHT] = | 47 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.RIGHT] = |
47 CustomMargins.Orientation.LEFT; | 48 CustomMargins.Orientation.LEFT; |
48 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.BOTTOM] = | 49 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.BOTTOM] = |
49 CustomMargins.Orientation.TOP; | 50 CustomMargins.Orientation.TOP; |
50 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.LEFT] = | 51 CustomMargins.OppositeOrientation_[CustomMargins.Orientation.LEFT] = |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 159 } |
159 return Math.round(max); | 160 return Math.round(max); |
160 } | 161 } |
161 }; | 162 }; |
162 | 163 |
163 // Export | 164 // Export |
164 return { | 165 return { |
165 CustomMargins: CustomMargins | 166 CustomMargins: CustomMargins |
166 }; | 167 }; |
167 }); | 168 }); |
OLD | NEW |