Skip to main content

Class: DomHelper

Constructors

new DomHelper()

new DomHelper(): DomHelper

Returns

DomHelper

Methods

addLoadingElements()

static addLoadingElements(): void

Add elements to hide the canvas and show a spinner.

Returns

void

Source

session/src/DomHelper.ts:40


addStyleSheet()

static addStyleSheet(css): void

Adds a style sheet to the head of the document.

Parameters

css: string

text of the CSS

Returns

void

Source

session/src/DomHelper.ts:31


configureDomForActivity()

static configureDomForActivity(activity): void

Depending on the type of activity, set the visibility of the survey div and canvas div.

Parameters

activity: Activity

the activity to configure the DOM for

Returns

void

Source

session/src/DomHelper.ts:67


createRoot()

static createRoot(rootElement): void

Specifies the HTML element in which to render the m2c2kit activities.

Parameters

rootElement: HTMLElement

the element to add the survey div and canvas div to

Returns

void

Source

session/src/DomHelper.ts:9


hideM2c2Elements()

static hideM2c2Elements(): void

Hide the canvas div and survey div.

Returns

void

Source

session/src/DomHelper.ts:83


setBusyAnimationVisibility()

static setBusyAnimationVisibility(visible): void

Shows or hides the busy animation.

Parameters

visible: boolean

true if the busy animation should be visible

Returns

void

Source

session/src/DomHelper.ts:109


setCanvasDivVisibility()

static private setCanvasDivVisibility(visible): void

Shows or hides the canvas div.

Parameters

visible: boolean

true if the canvas div should be visible

Returns

void

Source

session/src/DomHelper.ts:142


setCanvasOverlayVisibility()

static setCanvasOverlayVisibility(visible): void

Shows or hides the canvas overlay.

Parameters

visible: boolean

true if the canvas overlay should be visible

Returns

void

Source

session/src/DomHelper.ts:93


setSurveyDivVisibility()

static private setSurveyDivVisibility(visible): void

Shows or hides the survey div.

Parameters

visible: boolean

true if the survey div should be visible

Returns

void

Source

session/src/DomHelper.ts:125