|
@ -141,8 +141,7 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
* @returns {Siding} this Siding Object |
|
|
* @returns {Siding} this Siding Object |
|
|
*/ |
|
|
*/ |
|
|
left(amount) { |
|
|
left(amount) { |
|
|
this._fFirst = amount; |
|
|
return this.setByIndex(1, amount); |
|
|
return this; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -151,8 +150,7 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
* @returns {Siding} this Siding Object |
|
|
* @returns {Siding} this Siding Object |
|
|
*/ |
|
|
*/ |
|
|
right(amount) { |
|
|
right(amount) { |
|
|
this._fThird = amount; |
|
|
return this.setByIndex(3, amount); |
|
|
return this; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -161,8 +159,7 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
* @returns {Siding} this Siding Object |
|
|
* @returns {Siding} this Siding Object |
|
|
*/ |
|
|
*/ |
|
|
top(amount) { |
|
|
top(amount) { |
|
|
this._fSecond = amount; |
|
|
return this.setByIndex(2, amount); |
|
|
return this; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -171,21 +168,17 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
* @returns {Siding} this Siding Object |
|
|
* @returns {Siding} this Siding Object |
|
|
*/ |
|
|
*/ |
|
|
bottom(amount) { |
|
|
bottom(amount) { |
|
|
this._fForth = amount; |
|
|
return this.setByIndex(4, amount); |
|
|
return this; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* sets the amount-value for the horizontal sides (left and right). |
|
|
* sets the amount-value for the horizontal sides (left and right). |
|
|
* @param {number} amount siding for left and right. |
|
|
* @param {number} amount siding for left and right. |
|
|
* @returns {Sides} this Siding Object |
|
|
* @returns {Sides} this Siding Object |
|
|
*/ |
|
|
*/ |
|
|
horizontal(amount) { |
|
|
horizontal(amount) { |
|
|
this._fFirst = amount; |
|
|
return this.left(amount).right(amount); |
|
|
this._fThird = amount; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -194,9 +187,9 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
* @returns {Sides} this Siding Object |
|
|
* @returns {Sides} this Siding Object |
|
|
*/ |
|
|
*/ |
|
|
vertical(amount) { |
|
|
vertical(amount) { |
|
|
this._fSecond = amount; |
|
|
return this.top(amount).bottom(amount); |
|
|
this._fForth = amount; |
|
|
} |
|
|
return this; |
|
|
|
|
|
toModifications() { |
|
|
toModifications() { |
|
|
return [ |
|
|
return [ |
|
|
{ key: "left", value: this._fFirst + this._unit }, |
|
|
{ key: "left", value: this._fFirst + this._unit }, |
|
@ -220,6 +213,11 @@ class PaddingChain extends Sides { |
|
|
.padding(this); |
|
|
.padding(this); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Returns the corresponding Modifier. |
|
|
|
|
|
* Basically climbs up the chain level. |
|
|
|
|
|
* @returns {Modifier} |
|
|
|
|
|
*/ |
|
|
ensureModifier() { |
|
|
ensureModifier() { |
|
|
return this.toModifier() |
|
|
return this.toModifier() |
|
|
} |
|
|
} |
|
|