Skip to content

Classes

Airhogs777 edited this page Jul 7, 2016 · 21 revisions

This is a list of the classes that might be added to a block.

Note that these classes will almost always be added to an input/block's <g> element, not the path that represents the background. The one major exception is boolean inputs, which are just a <path> element.

Blocks

The block group itself gets the class block. The background <path> element for each block has the class block-background. In horizontal mode, their icons have the class icon.

Category Names

  • operators
  • looks
  • sounds
  • motion
  • control
  • event

Shapes

Reporters

  • reporter - all reporters have this class
  • boolean
  • strings - strings and numbers now both have this shape.

Non-reporters

Blocks that aren't reporters (sometimes called "stack blocks") may have one or more of these classes depending on its shape. A block will have the stack class unless it has the class hat or c-block. For example, the forever block will have the classes c-block and cap.

  • hat
  • stack
  • end - a terminal/cap block, like stop this script or forever.
  • c-block - any c-block, like if or forever
  • else - a c-block with more than one substack input (specifically, the if else block)

Inputs

Inputs all receive the input class. The background <path> element for each input has the class input-background. The input will also receive one of the following classes to reflect their type:

  • input-string - this applies to both strings an numbers
  • input-dropdown
  • input-boolean - this will be on the path itself, as opposed to on a <group>

Replacement and Insertion

  • replaceable - While dragging a reporter around, inputs or other reporters might have a "replacement glow" around them. When this happens, they'll have the class replaceable.
  • insertion-marker - currently broken. insertion markers are those "ghost blocks" that appear while you're dragging something. They'll have this class instead of a category name.

Other

  • The workspace SVG will ether have the class horizontal or vertical depending on if it uses the horizontal or vertical grammar.
  • In horizontal mode, the icons will have the class icon.
  • Dropdown menus have the class dropdown-menu, as well as one of the category classes from above.
Clone this wiki locally