DebugInstanceSubpanel

core/local/reactive/debugpanel~ DebugInstanceSubpanel

Component for the main reactive dev panel.

This component shows the list of reactive instances and handle the buttons to open a specific instance panel.

Constructor

new DebugInstanceSubpanel()

Source:

Methods

_checkJSON() → {undefined|array}

Source:

Check that the edited state JSON is valid.

Not all valid JSON are suitable for transforming the state. For example, the first level attributes cannot change the type.

Returns:

Array of state updates.

Type
undefined | array

_cleanAreas()

Source:

Listener method to clean the log area.

_generateStateUpdates(currentStateData, newStateData) → {array}

Source:

Check that the edited state JSON is valid.

Not all valid JSON are suitable for transforming the state. For example, the first level attributes cannot change the type. This method do a two steps comparison between the current state data and the new state data.

A reactive state cannot be overridden like any other variable. To keep the watchers updated is necessary to transform the current state into the new one. As a result, this method generates all the necessary state updates to convert the state into the new state.

Parameters:
Name Type Description
currentStateData object
newStateData object
Throws:

is the structure is not compatible

Type
Error
Returns:

Array of state updates.

Type
array

_pin()

Source:

Pin the panel into the footer.

_refreshLog(args)

Source:

Wtacher method to refresh the log panel.

Parameters:
Name Type Description
args object
Properties
Name Type Description
element HTMLElement

_refreshReadOnly()

Source:

Watcher to update the read only information.

_refreshState()

Source:

Watcher to refresh the state information.

_saveState()

Source:

Listener to save the current edited state into the real state.

_toggleButtonText(element)

Source:

Toogle the button text with the data-alt value.

Parameters:
Name Type Description
element Element

the button element

_toggleEditMode()

Source:

Listener to toggle the edit mode of the component.

_togglePin()

Source:

Pin and unpin the panel.

_unpin()

Source:

Unpin the panel form the footer.

create()

Source:

Constructor hook.

destroy()

Source:

Remove all subcomponents dependencies.

dragEnd(dropdata, event)

Source:

The element drop end hook.

Parameters:
Name Type Description
dropdata Object

the dropdata

event Event

the dropdata

getDraggableData() → {Object}

Source:

Get the draggable data of this component.

Returns:

exported course module drop data

Type
Object

getWatchers() → {Array}

Source:

Component watchers.

Returns:

of watchers

Type
Array

stateReady()

Source:

Initial state ready method.