Skip to main content

Home > blockly > blockRendering > PathObject > setClass_

blockRendering.PathObject.setClass_() method

Add or remove the given CSS class on the path object's root SVG element.

Signature:

protected setClass_(className: string, add: boolean): void;

Parameters

ParameterTypeDescription
classNamestringThe name of the class to add or remove
addbooleanTrue if the class should be added. False if it should be removed.

Returns:

void