25 lines
660 B
JavaScript
25 lines
660 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Style = void 0;
|
|
const Feature_1 = require("../types/Feature");
|
|
class Style extends Feature_1.Feature {
|
|
styleDict;
|
|
constructor(styleDict) {
|
|
super();
|
|
this.styleDict = styleDict;
|
|
}
|
|
getStyleDict() {
|
|
return this.styleDict;
|
|
}
|
|
getActionIcon(entity, action) {
|
|
const icon = this.styleDict[entity]?.icon;
|
|
return icon && icon[action];
|
|
}
|
|
getColor(entity, attr, value) {
|
|
const color = this.styleDict[entity]?.color;
|
|
return color && color[attr] && color[attr][value];
|
|
}
|
|
}
|
|
exports.Style = Style;
|
|
;
|