ve.ScriptManagerBlockly

ve.Component. ve.ScriptManagerBlockly

Refer to ve.Component for methods or fields inherited from this Component's parent such as .options.attributes or .element.

Represents a Blockly sub-component used as a visual editor for ve.ComponentScriptManager.

Note. Declaring duplicate ve.ScriptManager components will reset the main Blockly workspace for each new instance.

  • Functional binding: veScriptManagerBlockly().
Constructor:
  • arg0_value: string - The code to input into the present Blockly viewer.
  • arg1_options: Object
    • .script_manager: ve.ScriptManager
Instance:
  • .workspace: Blockly.Workspace
  • .v: string
Methods:
  • disable()
  • enable()
  • fixBlocklyScaling()
  • handleCSS()
  • hide()
  • interceptBlocklyTransforms()
  • setTheme(arg0_theme:string) - Either 'theme_default'/'theme_light'.
  • show()

Extends

Members

v :string

Returns the code value of the present Component by parsing ES6 JS as an Abstract Syntax Tree.

  • Accessor of: ve.ScriptManagerBlockly
Source:
Type:
  • string

v

Sets the code value of the present Component if possible.

  • Accessor of: ve.ScriptManagerBlockly
Source:

from_binding

Internal .from_binding setter for handling .options.from_binding. Accepts a string literal that is then parsed to a variable reference.

.to_binding counterparts are manually handled child-side.

Overrides:
Source:

limit

Tests the current this.limit by calling this.limit_function(this.v, this). Otherwise resolves to true if no .options.limit is set.

Overrides:
Source:

name

Returns the visual name of the present ve.Component,

Overrides:
Source:

Methods

disable()

Disables the present workspace.

  • Method of: ve.ScriptManagerBlockly
Source:

enable()

Enables the present workspace.

  • Method of: ve.ScriptManagerBlockly
Source:

fixBlocklyScaling()

Internal helper method. Fixes Blockly scaling issues.

  • Method of: ve.ScriptManagerBlockly
Source:

handleCSS()

Internal helper method. Handles CSS issues so that Blockly can be mounted into a window.

  • Method of: ve.ScriptManagerBlockly
Source:

hide()

Hides the present workspace entirely.

  • Method of: ve.ScriptManagerBlockly
Source:

interceptBlocklyTransforms()

Internal helper method. Fixes Blockly transforms so that Blockly can be mounted into a window.

  • Method of: ve.ScriptManagerBlockly
Source:

setTheme(arg0_theme_class)

Internal helper method. Propagates the main editor theme class down from ve.ScriptManager. Either 'theme-default'/'theme-light'.

  • Method of: ve.ScriptManagerBlockly
Source:
Parameters:
Name Type Description
arg0_theme_class string

show()

Displays the present workspace if hidden.

  • Method of: ve.ScriptManagerBlockly
Source:

addComponent()

Adds the current component to this.parent_el should it exist.

Overrides:
Source:

bind(arg0_container_el)

Manually binds/mounts the present ve.Component into the visual DOM.

Overrides:
Source:
Parameters:
Name Type Description
arg0_container_el HTMLElement

fireFromBinding()

Pseudo-setter from binding. Fires only upon program-driven changes to .v directly, which means that this has to be monitored manually component-side in set v(). This should always come last in set v().

Overrides:
Source:

fireToBinding()

Pseudo-setter to binding. Fires only upon user-driven changes, which means that this has to be monitored manually component-side.

Overrides:
Source:

remove()

Removes the component/element from the DOM.

Overrides:
Source:

removeComponent()

Removes the current component from this.parent_el should it exist.

Overrides:
Source:

setOwner(arg0_value, arg1_owner_array)

Sets the root parent and ownership tree. Influences this.parent_el, this.owner, this.owners.

Overrides:
Source:
Parameters:
Name Type Description
arg0_value
arg1_owner_array

setValueFromObject(arg0_object, arg1_object)

Destructures Object values and transfers them into the .v instance fields of each Vercengen component.

Overrides:
Source:
Parameters:
Name Type Description
arg0_object Object

The Vercengen object to transfer to.

arg1_object Object

The other object to transfer from.