Browse Source

DRAFT,FEAT: adding an identifier to a modifier for potential reuse

dev-feat-identifier_for_modifier
chris 2 months ago
parent
commit
3ce9dbf5a5
  1. 19
      src/modifier/Modifier.js

19
src/modifier/Modifier.js

@ -4,6 +4,10 @@
* _modifications: {Object}
*/
class Modifier {
/**
* @type {string} _identifier
*/
_identifier;
/**
* @type {Map<string,string>} _modifications
*/
@ -21,11 +25,24 @@ class Modifier {
*/
_paddingValues;
constructor() {
constructor(identifier = null) {
if (identifier) {
this._identifier = identifier;
}
this._modifications = new Object();
this._removeMods = [];
}
/**
*
* @param {string} identifier
* @returns {Modifier|ChainableModifier}
*/
setIdentifier(identifier) {
this._identifier = identifier;
return this;
}
/**
* Sets the modifications for widht and height to 100%.
* @returns {Modifier} this modifier object

Loading…
Cancel
Save