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}

Description:
  • 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.

Source:
Returns:

Array of state updates.

Type
undefined | array

_cleanAreas()

Description:
  • Listener method to clean the log area.

Source:

_generateStateUpdates(currentStateData, newStateData) → {array}

Description:
  • 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.

Source:
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()

Description:
  • Pin the panel into the footer.

Source:

_refreshLog(args)

Description:
  • Watcher method to refresh the log panel.

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

_refreshReadOnly()

Description:
  • Watcher to update the read only information.

Source:

_refreshState()

Description:
  • Watcher to refresh the state information.

Source:

_saveState()

Description:
  • Listener to save the current edited state into the real state.

Source:

_toggleButtonText(element)

Description:
  • Toogle the button text with the data-alt value.

Source:
Parameters:
Name Type Description
element Element

the button element

_toggleEditMode()

Description:
  • Listener to toggle the edit mode of the component.

Source:

_togglePin()

Description:
  • Pin and unpin the panel.

Source:

_unpin()

Description:
  • Unpin the panel form the footer.

Source:

create()

Description:
  • Constructor hook.

Source:

destroy()

Description:
  • Remove all subcomponents dependencies.

Source:

dragEnd(dropdata, event)

Description:
  • The element drop end hook.

Source:
Parameters:
Name Type Description
dropdata Object

the dropdata

event Event

the dropdata

getDraggableData() → {Object}

Description:
  • Get the draggable data of this component.

Source:
Returns:

exported course module drop data

Type
Object

getWatchers() → {Array}

Description:
  • Component watchers.

Source:
Returns:

of watchers

Type
Array

stateReady()

Description:
  • Initial state ready method.

Source: