processFillColor

[ Function ]

public static processFillColor(
    element: Jquery<SVGElement | HTMLElement> | readonly SVGElement[] | NodeListOf<SVGElement> | HTMLCollectionOf<SVGElement> | SVGElement | undefined,
    valueNew: TcHmi.Color | null | undefined
): void;

Sets the fill color for one or more SVG elements.

Parameter

Name

Type

Description

element

Info: Type SVGElement supported from version 1.10
Info: Types SVGElement[] | NodeListOf<SVGElement> | HTMLCollectionOf<SVGElement> from version 1.10.1171.21

JQuery<SVGElement | HTMLElement>, readonly SVGElement[], NodeListOf<SVGElement>, HTMLCollectionOf<SVGElement>, SVGElement, undefined

  • jQuery collection with the elements to be changed
  • any array-like element list (also for example from document.querySelectorAll() or document.getElementsByClassName())
  • single SVG element

valueNew

TcHmi.Color, null

Object for the color.

Return value

Type

Description

void

No return value

processFillColor 1:

Available from version 1.10

Sample - JavaScript

var newElem = dummyControl.getElement().find('rect'); // SVG rect as a control child
TcHmi.StyleProvider.processFillColor(newElem,
    {color: 'red'}
);