Set active style.
(selector: string, property: string, value: CssPropertyValue)
| 372 | |
| 373 | /** Set active style. */ |
| 374 | private setStyle(selector: string, property: string, value: CssPropertyValue) { |
| 375 | const elements = this.allObjects.get(selector)!; |
| 376 | |
| 377 | const valueString = stringifyParsedValue(value); |
| 378 | |
| 379 | if (elements instanceof Element) { |
| 380 | this.renderer.setStyle(elements, property, valueString); |
| 381 | } else { |
| 382 | for (const e of elements) { |
| 383 | this.renderer.setStyle(e, property, valueString); |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | const activeStyles = this.activeStyles.get(selector) || {}; |
| 388 | activeStyles[property] = value; |
| 389 | this.activeStyles.set(selector, activeStyles); |
| 390 | } |
| 391 | |
| 392 | /** Remove active style. */ |
| 393 | private removeStyle(selector: string, property: string) { |
no test coverage detected