Format some .js.

This commit is contained in:
Paulo Gustavo Veiga
2015-04-12 00:23:24 -03:00
parent 04e1f71faa
commit 3d36a4d9d4
31 changed files with 531 additions and 479 deletions

View File

@@ -17,27 +17,36 @@
*/
core.Point = new Class({
initialize : function(x, y) {
/**
* @constructs
* @param {Number} x coordinate
* @param {Number} y coordinate
*/
initialize: function (x, y) {
this.x = x;
this.y = y;
},
setValue : function(x, y) {
/**
* @param {Number} x coordinate
* @param {Number} y coordinate
*/
setValue: function (x, y) {
this.x = x;
this.y = y;
},
inspect : function() {
inspect: function () {
return "{x:" + this.x + ",y:" + this.y + "}";
},
clone : function() {
clone: function () {
return new core.Point(this.x, this.y);
}
});
core.Point.fromString = function(point) {
core.Point.fromString = function (point) {
var values = point.split(',');
return new core.Point(values[0], values[1]);