|
|
@ -176,8 +176,8 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
|
|
|
|
/** |
|
|
|
* sets the amount-value for the left side. |
|
|
|
* @param {number} amount siding for left |
|
|
|
* @returns {Siding} this Siding Object |
|
|
|
* @param {number} amount Sides for left |
|
|
|
* @returns {Sides} this Sides Object |
|
|
|
*/ |
|
|
|
left(amount) { |
|
|
|
return this.setByIndex(1, amount); |
|
|
@ -185,8 +185,8 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
|
|
|
|
/** |
|
|
|
* sets the amount-value for the right side. |
|
|
|
* @param {number} amount siding for right |
|
|
|
* @returns {Siding} this Siding Object |
|
|
|
* @param {number} amount Sides for right |
|
|
|
* @returns {Sides} this Sides Object |
|
|
|
*/ |
|
|
|
right(amount) { |
|
|
|
return this.setByIndex(3, amount); |
|
|
@ -194,8 +194,8 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
|
|
|
|
/** |
|
|
|
* sets the amount-value for the top side. |
|
|
|
* @param {number} amount siding for top |
|
|
|
* @returns {Siding} this Siding Object |
|
|
|
* @param {number} amount Sides for top |
|
|
|
* @returns {Sides} this Sides Object |
|
|
|
*/ |
|
|
|
top(amount) { |
|
|
|
return this.setByIndex(2, amount); |
|
|
@ -203,8 +203,8 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
|
|
|
|
/** |
|
|
|
* sets the amount-value for the bottom side. |
|
|
|
* @param {number} amount siding for bottom |
|
|
|
* @returns {Siding} this Siding Object |
|
|
|
* @param {number} amount Sides for bottom |
|
|
|
* @returns {Sides} this Sides Object |
|
|
|
*/ |
|
|
|
bottom(amount) { |
|
|
|
return this.setByIndex(4, amount); |
|
|
@ -213,8 +213,8 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
|
|
|
|
/** |
|
|
|
* sets the amount-value for the horizontal sides (left and right). |
|
|
|
* @param {number} amount siding for left and right. |
|
|
|
* @returns {Sides} this Siding Object |
|
|
|
* @param {number} amount Sides for left and right. |
|
|
|
* @returns {Sides} this Sides Object |
|
|
|
*/ |
|
|
|
horizontal(amount) { |
|
|
|
return this.left(amount).right(amount); |
|
|
@ -222,8 +222,8 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
|
|
|
|
/** |
|
|
|
* sets the amount-value for the vertical sides (left and right). |
|
|
|
* @param {number} amount siding for top and bottom. |
|
|
|
* @returns {Sides} this Siding Object |
|
|
|
* @param {number} amount Sides for top and bottom. |
|
|
|
* @returns {Sides} this Sides Object |
|
|
|
*/ |
|
|
|
vertical(amount) { |
|
|
|
return this.top(amount).bottom(amount); |
|
|
@ -259,12 +259,23 @@ class Sides extends DirectionUnitDependentAttribute { |
|
|
|
* @extends Sides |
|
|
|
*/ |
|
|
|
class PaddingChain extends Sides { |
|
|
|
/** |
|
|
|
* @type {Modifier} |
|
|
|
*/ |
|
|
|
_modifier; |
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {Modifier} modifier |
|
|
|
*/ |
|
|
|
constructor(modifier) { |
|
|
|
super(); |
|
|
|
this._modifier = modifier; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @returns {Modifier} |
|
|
|
*/ |
|
|
|
toModifier() { |
|
|
|
return this._modifier |
|
|
|
.padding(this); |
|
|
|