Clean up strange constructor notation that causes linting issue.

This commit is contained in:
Jürg Lehni 2013-12-07 19:45:10 +01:00
parent 2401b38b03
commit 7800e5f84e

View file

@ -237,8 +237,8 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
* @bean * @bean
*/ */
getPoint: function(/* dontLink */) { getPoint: function(/* dontLink */) {
return new (arguments[0] ? Point : LinkedPoint) return new (arguments[0] ? Point : LinkedPoint)(
(this.x, this.y, this, 'setPoint'); this.x, this.y, this, 'setPoint');
}, },
setPoint: function(point) { setPoint: function(point) {
@ -255,8 +255,8 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
* @bean * @bean
*/ */
getSize: function(/* dontLink */) { getSize: function(/* dontLink */) {
return new (arguments[0] ? Size : LinkedSize) return new (arguments[0] ? Size : LinkedSize)(
(this.width, this.height, this, 'setSize'); this.width, this.height, this, 'setSize');
}, },
setSize: function(size) { setSize: function(size) {
@ -401,8 +401,8 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
* @bean * @bean
*/ */
getCenter: function(/* dontLink */) { getCenter: function(/* dontLink */) {
return new (arguments[0] ? Point : LinkedPoint) return new (arguments[0] ? Point : LinkedPoint)(
(this.getCenterX(), this.getCenterY(), this, 'setCenter'); this.getCenterX(), this.getCenterY(), this, 'setCenter');
}, },
setCenter: function(point) { setCenter: function(point) {
@ -809,8 +809,8 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
get = 'get' + part, get = 'get' + part,
set = 'set' + part; set = 'set' + part;
this[get] = function(/* dontLink */) { this[get] = function(/* dontLink */) {
return new (arguments[0] ? Point : LinkedPoint) return new (arguments[0] ? Point : LinkedPoint)(
(this[getX](), this[getY](), this, set); this[getX](), this[getY](), this, set);
}; };
this[set] = function(point) { this[set] = function(point) {
point = Point.read(arguments); point = Point.read(arguments);