| 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 * Immutable two dimensional point in space. The units of the dimensions are | 9 * Immutable two dimensional point in space. The units of the dimensions are |
| 10 * undefined. | 10 * undefined. |
| 11 * @param {number} x X-dimension of the point. | 11 * @param {number} x X-dimension of the point. |
| 12 * @param {number} y Y-dimension of the point. | 12 * @param {number} y Y-dimension of the point. |
| 13 * @constructor | 13 * @constructor |
| 14 */ | 14 */ |
| 15 function Coordinate2d(x, y) { | 15 function Coordinate2d(x, y) { |
| 16 /** | 16 /** |
| 17 * X-dimension of the point. | 17 * X-dimension of the point. |
| 18 * @type {number} | 18 * @type {number} |
| 19 * @private | 19 * @private |
| 20 */ | 20 */ |
| 21 this.x_ = x; | 21 this.x_ = x; |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Y-dimension of the point. | 24 * Y-dimension of the point. |
| 25 * @type {number} | 25 * @type {number} |
| 26 * @private | 26 * @private |
| 27 */ | 27 */ |
| 28 this.y_ = y; | 28 this.y_ = y; |
| 29 }; | 29 } |
| 30 | 30 |
| 31 Coordinate2d.prototype = { | 31 Coordinate2d.prototype = { |
| 32 /** @return {number} X-dimension of the point. */ | 32 /** @return {number} X-dimension of the point. */ |
| 33 get x() { | 33 get x() { |
| 34 return this.x_; | 34 return this.x_; |
| 35 }, | 35 }, |
| 36 | 36 |
| 37 /** @return {number} Y-dimension of the point. */ | 37 /** @return {number} Y-dimension of the point. */ |
| 38 get y() { | 38 get y() { |
| 39 return this.y_; | 39 return this.y_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 67 this.x_ == other.x_ && | 67 this.x_ == other.x_ && |
| 68 this.y_ == other.y_; | 68 this.y_ == other.y_; |
| 69 } | 69 } |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 // Export | 72 // Export |
| 73 return { | 73 return { |
| 74 Coordinate2d: Coordinate2d | 74 Coordinate2d: Coordinate2d |
| 75 }; | 75 }; |
| 76 }); | 76 }); |
| OLD | NEW |