processStrokeColor

[ Function ]

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

Sets the stroke 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

processStrokeColor 1:

Available from version 1.10

Sample - JavaScript

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