MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / toName

Method toName

src/common/overlay/levelRenderer/Color.js:595–602  ·  view source on GitHub ↗

* @function LevelRenderer.Tool.Color.prototype.toName * @description 转换颜色名。 * @param {string} color - 颜色。 * @returns {string} 颜色名

(color)

Source from the content-addressed store, hash-verified

593 * @returns {string} 颜色名
594 */
595 toName(color) {
596 for (var key in this._nameColors) {
597 if (this.toHex(this._nameColors[key]) === this.toHex(color)) {
598 return key;
599 }
600 }
601 return null;
602 }
603
604 /**
605 * @function LevelRenderer.Tool.Color.prototype.trim

Callers 1

ColorSpec.jsFile · 0.80

Calls 1

toHexMethod · 0.95

Tested by

no test coverage detected