initial import
[roojs1] / Roo / lib / Point.js
1 /*
2  * Portions of this file are based on pieces of Yahoo User Interface Library
3  * Copyright (c) 2007, Yahoo! Inc. All rights reserved.
4  * YUI licensed under the BSD License:
5  * http://developer.yahoo.net/yui/license.txt
6  * <script type="text/javascript">
7  *
8  */
9 //@@dep Roo.lib.Region
10
11
12 Roo.lib.Point = function(x, y) {
13     if (x instanceof Array) {
14         y = x[1];
15         x = x[0];
16     }
17     this.x = this.right = this.left = this[0] = x;
18     this.y = this.top = this.bottom = this[1] = y;
19 };
20
21 Roo.lib.Point.prototype = new Roo.lib.Region();