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', function() { | 5 cr.define('print_preview', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Creates a Margins object that holds four margin values in points. | 9 * Creates a Margins object that holds four margin values in points. |
10 * @param {number} top The top margin in pts. | 10 * @param {number} top The top margin in pts. |
11 * @param {number} right The right margin in pts. | 11 * @param {number} right The right margin in pts. |
12 * @param {number} bottom The bottom margin in pts. | 12 * @param {number} bottom The bottom margin in pts. |
13 * @param {number} left The left margin in pts. | 13 * @param {number} left The left margin in pts. |
14 * @constructor | 14 * @constructor |
15 */ | 15 */ |
16 function Margins(top, right, bottom, left) { | 16 function Margins(top, right, bottom, left) { |
17 /** | 17 /** |
18 * Backing store for the margin values in points. | 18 * Backing store for the margin values in points. |
19 * @type {!Object.< | 19 * @type {!Object< |
20 * !print_preview.ticket_items.CustomMargins.Orientation, number>} | 20 * !print_preview.ticket_items.CustomMargins.Orientation, number>} |
21 * @private | 21 * @private |
22 */ | 22 */ |
23 this.value_ = {}; | 23 this.value_ = {}; |
24 this.value_[print_preview.ticket_items.CustomMargins.Orientation.TOP] = top; | 24 this.value_[print_preview.ticket_items.CustomMargins.Orientation.TOP] = top; |
25 this.value_[print_preview.ticket_items.CustomMargins.Orientation.RIGHT] = | 25 this.value_[print_preview.ticket_items.CustomMargins.Orientation.RIGHT] = |
26 right; | 26 right; |
27 this.value_[print_preview.ticket_items.CustomMargins.Orientation.BOTTOM] = | 27 this.value_[print_preview.ticket_items.CustomMargins.Orientation.BOTTOM] = |
28 bottom; | 28 bottom; |
29 this.value_[print_preview.ticket_items.CustomMargins.Orientation.LEFT] = | 29 this.value_[print_preview.ticket_items.CustomMargins.Orientation.LEFT] = |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 104 } |
105 return clone; | 105 return clone; |
106 } | 106 } |
107 }; | 107 }; |
108 | 108 |
109 // Export | 109 // Export |
110 return { | 110 return { |
111 Margins: Margins | 111 Margins: Margins |
112 }; | 112 }; |
113 }); | 113 }); |
OLD | NEW |