Remove getChecksum functions

This commit is contained in:
Frederic Junod
2018-12-14 11:37:48 +01:00
parent 1bb1e3c542
commit 0ec769c234
5 changed files with 0 additions and 444 deletions
-26
View File
@@ -29,12 +29,6 @@ class Fill {
* @type {import("../color.js").Color|import("../colorlike.js").ColorLike}
*/
this.color_ = options.color !== undefined ? options.color : null;
/**
* @private
* @type {string|undefined}
*/
this.checksum_ = undefined;
}
/**
@@ -66,28 +60,8 @@ class Fill {
*/
setColor(color) {
this.color_ = color;
this.checksum_ = undefined;
}
/**
* @return {string} The checksum.
*/
getChecksum() {
if (this.checksum_ === undefined) {
const color = this.color_;
if (color) {
if (Array.isArray(color) || typeof color == 'string') {
this.checksum_ = 'f' + asString(/** @type {import("../color.js").Color|string} */ (color));
} else {
this.checksum_ = getUid(this.color_);
}
} else {
this.checksum_ = 'f-';
}
}
return this.checksum_;
}
}
export default Fill;