sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    addChangeListener addFlyout addTopBlock addTopBoundedElement addTopComment addTrashcan addTypedBlock addZoomControls allInputsFilled beginCanvasTransition cancelCurrentGesture centerOnBlock cleanUp clear clearGesture clearUndo configureContextMenu createDom createPotentialVariableMap createVariable deleteVariableById dispose endCanvasTransition fireChangeListener getAllBlocks getAllVariableNames getAllVariables getAudioManager getBlockById getBlockCanvas getBlockDragSurface getBlocksBoundingBox getBlocksByType getBubbleCanvas getButtonCallback getCachedParentSvgSize getCanvas getCommentById getComponentManager getCursor getDragTarget getFlyout getGesture getGrid getInjectionDiv getInverseScreenCTM getMarker getMarkerManager getMetricsManager getOriginOffsetInPixels getParentSvg getPotentialVariableMap getRedoStack getRenderer getScale getSvgXY getTheme getThemeManager getToolbox getToolboxCategoryCallback getTopBlocks getTopBoundedElements getTopComments getUndoStack getVariable getVariableById getVariableMap getVariablesOfType getVariableTypes getVariableUsesById getWidth hasBlockLimits highlightBlock isCapacityAvailable isDraggable isDragging isMovable isMovableHorizontally isMovableVertically isVisible markFocused maybeFireViewportChangeEvent moveDrag newBlock paste recordDeleteAreas recordDragTargets refreshTheme refreshToolboxSelection registerButtonCallback registerToolboxCategoryCallback remainingCapacity remainingCapacityOfType removeBlockById removeButtonCallback removeChangeListener removeToolboxCategoryCallback removeTopBlock removeTopBoundedElement removeTopComment removeTypedBlock renameVariableById render resetDragSurface resize resizeContents scroll scrollCenter setBlockById setCachedParentSvgSize setCursorSvg setMarkerSvg setMetricsManager setResizeHandlerWrapper setResizesEnabled setScale setTheme setupDragSurface setVariableMap setVisible showContextMenu startDrag translate undo updateInverseScreenCTM updateScreenCalculationsIfScrolled updateToolbox zoom zoomCenter zoomToFit

    Constructors

    Properties

    connectionChecker: IConnectionChecker

    An object that encapsulates logic for safety, type, and dragging checks.

    connectionDBList: Blockly.ConnectionDB[]

    Set of databases for rapid lookup of connection locations.

    getMetrics: () => Blockly.utils.Metrics

    Method to get all the metrics that have to do with a workspace.

    horizontalLayout: boolean
    id: string
    isClearing: boolean

    Returns true if the workspace is currently in the process of a bulk clear.

    isFlyout: boolean

    Is this workspace the surface for a flyout?

    isMutator: boolean

    Is this workspace the surface for a mutator?

    keyboardAccessibilityMode: boolean

    True if keyboard accessibility mode is on, false otherwise.

    MAX_UNDO: number

    Maximum number of undo events in stack. 0 turns off undo, Infinity sets it to unlimited.

    options: Blockly.Options
    rendered: boolean

    The render status of an SVG workspace. Returns false for headless workspaces and true for instances of Blockly.WorkspaceSvg.

    RTL: boolean
    scale: number

    Current scale.

    scrollbar: ScrollbarPair

    This workspace's scrollbars, if they exist.

    scrollX: number

    Current horizontal scrolling offset in pixel units, relative to the workspace origin.

    It is useful to think about a view, and a canvas moving beneath that view. As the canvas moves right, this value becomes more positive, and the view is now "seeing" the left side of the canvas. As the canvas moves left, this value becomes more negative, and the view is now "seeing" the right side of the canvas.

    The confusing thing about this value is that it does not, and must not include the absoluteLeft offset. This is because it is used to calculate the viewLeft value.

    The viewLeft is relative to the workspace origin (although in pixel units). The workspace origin is the top-left corner of the workspace (at least when it is enabled). It is shifted from the top-left of the blocklyDiv so as not to be beneath the toolbox.

    When the workspace is enabled the viewLeft and workspace origin are at the same X location. As the canvas slides towards the right beneath the view this value (scrollX) becomes more positive, and the viewLeft becomes more negative relative to the workspace origin (imagine the workspace origin as a dot on the canvas sliding to the right as the canvas moves).

    So if the scrollX were to include the absoluteLeft this would in a way "unshift" the workspace origin. This means that the viewLeft would be representing the left edge of the blocklyDiv, rather than the left edge of the workspace.

    scrollY: number

    Current vertical scrolling offset in pixel units, relative to the workspace origin.

    It is useful to think about a view, and a canvas moving beneath that view. As the canvas moves down, this value becomes more positive, and the view is now "seeing" the upper part of the canvas. As the canvas moves up, this value becomes more negative, and the view is "seeing" the lower part of the canvas.

    This confusing thing about this value is that it does not, and must not include the absoluteTop offset. This is because it is used to calculate the viewTop value.

    The viewTop is relative to the workspace origin (although in pixel units). The workspace origin is the top-left corner of the workspace (at least when it is enabled). It is shifted from the top-left of the blocklyDiv so as not to be beneath the toolbox.

    When the workspace is enabled the viewTop and workspace origin are at the same Y location. As the canvas slides towards the bottom this value (scrollY) becomes more positive, and the viewTop becomes more negative relative to the workspace origin (image in the workspace origin as a dot on the canvas sliding downwards as the canvas moves).

    So if the scrollY were to include the absoluteTop this would in a way "unshift" the workspace origin. This means that the viewTop would be representing the top edge of the blocklyDiv, rather than the top edge of the workspace.

    setMetrics: (_0: { x: number; y: number }) => void

    Translates the workspace.

    startScrollX: number

    Horizontal scroll value when scrolling started in pixel units.

    startScrollY: number

    Vertical scroll value when scrolling started in pixel units.

    svgBackground_: SVGElement
    svgBlockCanvas_: SVGElement
    svgBubbleCanvas_: SVGElement
    svgGroup_: SVGElement
    [Trashcan and/or flyout may go here]
    targetWorkspace: WorkspaceSvg

    In a flyout, the target workspace where blocks should be placed after a drag. Otherwise null.

    toolboxPosition: Blockly.utils.toolbox.Position
    trashcan: Trashcan
    zoomControls_: ZoomControls

    Methods

    • When something in this workspace changes, call a function. Note that there may be a few recent events already on the stack. Thus the new change listener might be called with events that occurred a few milliseconds before the change listener was added.

      Parameters

      Returns Function

      Obsolete return value, ignore.

    • Adds a block to the list of top blocks.

      Parameters

      Returns void

    • Adds a bounded element to the list of top bounded elements.

      Parameters

      Returns void

    • Add a trashcan.

      Returns void

    • Add a block to the list of blocks keyed by type.

      Parameters

      Returns void

    • Add zoom controls.

      Returns void

    • Checks whether all value and statement inputs in the workspace are filled with blocks.

      Parameters

      • Optionalopt_shadowBlocksAreFilled: boolean

        An optional argument controlling whether shadow blocks are counted as filled. Defaults to true.

      Returns boolean

      True if all inputs are filled, false otherwise.

    • Add a transition class to the block and bubble canvas, to animate any transform changes.

      Returns void

    • Cancel the current gesture, if one exists.

      Returns void

    • Scroll the workspace to center on the given block.

      Parameters

      • id: string

        ID of block center on.

      Returns void

    • Clean up the workspace by ordering all the blocks in a column.

      Returns void

    • Dispose of all blocks in workspace, with an optimization to prevent resizes.

      Returns void

    • Clear the reference to the current gesture.

      Returns void

    • Clear the undo/redo stacks.

      Returns void

    • Developers may define this function to add custom menu options to the workspace's context menu or edit the workspace-created set of menu options.

      Parameters

      • options: Object[]

        List of menu options to add to.

      • e: Event

        The right-click event that triggered the context menu.

      Returns void

    • Create the workspace DOM elements.

      Parameters

      • Optionalopt_backgroundClass: string

        Either 'blocklyMainBackground' or 'blocklyMutatorBackground'.

      Returns Element

      The workspace's SVG group.

    • Create and store the potential variable map for this workspace.

      Returns void

    • Create a new variable with the given name. Update the flyout to show the new variable immediately.

      Parameters

      • name: string

        The new variable's name.

      • Optionalopt_type: string

        The type of the variable like 'int' or 'string'. Does not need to be unique. Field_variable can filter variables based on their type. This will default to '' which is a specific type.

      • Optionalopt_id: string

        The unique ID of the variable. This will default to a UUID.

      Returns Blockly.VariableModel

      The newly created variable.

    • Delete a variable by the passed in ID. Update the flyout to show immediately that the variable is deleted.

      Parameters

      • id: string

        ID of variable to delete.

      Returns void

    • Dispose of this workspace. Unlink from all DOM elements to prevent memory leaks.

      Returns void

    • Remove transition class from the block and bubble canvas.

      Returns void

    • Fire a change event.

      Parameters

      Returns void

    • Find all blocks in workspace. Blocks are optionally sorted by position; top to bottom (with slight LTR or RTL bias).

      Parameters

      • ordered: boolean

        Sort the list if true.

      Returns Blockly.Block[]

      Array of blocks.

    • Returns all variable names of all types.

      Returns string[]

      List of all variable names of all types.

    • Get the audio manager for this workspace.

      Returns WorkspaceAudio

      The audio manager for this workspace.

    • Find the block on this workspace with the specified ID.

      Parameters

      • id: string

        ID of block to find.

      Returns Blockly.Block

      The sought after block, or null if not found.

    • Get the SVG block canvas for the workspace.

      Returns SVGElement

      The SVG group for the workspace.

    • Gets the drag surface blocks are moved to when a drag is started.

      Returns BlockDragSurfaceSvg

      This workspace's block drag surface, if one is in use.

    • Calculate the bounding box for the blocks on the workspace. Coordinate system: workspace coordinates.

      Returns Blockly.utils.Rect

      Contains the position and size of the bounding box containing the blocks on the workspace.

    • Finds the blocks with the associated type and returns them. Blocks are optionally sorted by position; top to bottom (with slight LTR or RTL bias).

      Parameters

      • type: string

        The type of block to search for.

      • ordered: boolean

        Sort the list if true.

      Returns Blockly.Block[]

      The blocks of the given type.

    • Get the SVG element that forms the bubble surface.

      Returns SVGGElement

      SVG group element.

    • Get the callback function associated with a given key, for clicks on buttons and labels in the flyout.

      Parameters

      • key: string

        The name to use to look up the function.

      Returns (_0: Blockly.FlyoutButton) => any

      The function corresponding to the given key for this workspace; null if no callback is registered.

    • Gets the size of the workspace's parent SVG element.

      Returns Blockly.utils.Size

      The cached width and height of the workspace's parent SVG element.

    • Get the SVG element that forms the drawing surface.

      Returns SVGGElement

      SVG group element.

    • Gets the component manager for this workspace.

      Returns Blockly.ComponentManager

      The component manager.

    • The cursor for this workspace.

      Returns Cursor

      The cursor for the workspace.

    • Returns the drag target the mouse event is over.

      Parameters

      • e: Event

        Mouse move event.

      Returns IDragTarget

      Null if not over a drag target, or the drag target the event is over.

    • Getter for the flyout associated with this workspace. This flyout may be owned by either the toolbox or the workspace, depending on toolbox configuration. It will be null if there is no flyout.

      Parameters

      • Optionalopt_own: boolean

        Whether to only return the workspace's own flyout.

      Returns IFlyout

      The flyout on this workspace.

    • Look up the gesture that is tracking this touch stream on this workspace. May create a new gesture.

      Parameters

      • e: Event

        Mouse event or touch event.

      Returns Blockly.TouchGesture

      The gesture that is tracking this touch stream, or null if no valid gesture exists.

    • Get the grid object for this workspace, or null if there is none.

      Returns Blockly.Grid

      The grid object for this workspace.

    • Return the injection div that is a parent of this workspace. Walks the DOM the first time it's called, then returns a cached value. Note: We assume this is only called after the workspace has been injected into the DOM.

      Returns Element

      The first parent div with 'injectionDiv' in the name.

    • Getter for the inverted screen CTM.

      Returns DOMMatrix

      The matrix to use in mouseToSvg

    • Get the marker with the given ID.

      Parameters

      • id: string

        The ID of the marker.

      Returns Marker

      The marker with the given ID or null if no marker with the given ID exists.

    • Get the marker manager for this workspace.

      Returns Blockly.MarkerManager

      The marker manager.

    • Gets the metrics manager for this workspace.

      Returns IMetricsManager

      The metrics manager.

    • Return the position of the workspace origin relative to the injection div origin in pixels. The workspace origin is where a block would render at position (0, 0). It is not the upper left corner of the workspace SVG.

      Returns Blockly.utils.Coordinate

      Offset in pixels.

    • Get the SVG element that contains this workspace. Note: We assume this is only called after the workspace has been injected into the DOM.

      Returns SVGElement

      SVG element.

    • Return the variable map that contains "potential" variables. These exist in the flyout but not in the workspace.

      Returns VariableMap

      The potential variable map.

    • Gets the redo stack for workplace.

      Returns Abstract[]

      redo stack

    • Get the workspace's zoom factor. If the workspace has a parent, we call into the parent to get the workspace scale.

      Returns number

      The workspace zoom factor. Units: (pixels / workspaceUnit).

    • Return the absolute coordinates of the top-left corner of this element, scales that after canvas SVG element, if it's a descendant. The origin (0,0) is the top-left corner of the Blockly SVG.

      Parameters

      • element: SVGElement

        SVG element to find the coordinates of.

      Returns Blockly.utils.Coordinate

      Object with .x and .y properties.

    • Get the workspace theme object.

      Returns Blockly.Theme

      The workspace theme object.

    • Get the theme manager for this workspace.

      Returns Blockly.ThemeManager

      The theme manager for this workspace.

    • Getter for the toolbox associated with this workspace, if one exists.

      Returns IToolbox

      The toolbox on this workspace.

    • Get the callback function associated with a given key, for populating custom toolbox categories in this workspace.

      Parameters

      • key: string

        The name to use to look up the function.

      Returns (_0: Blockly.Workspace) => Element[]

      The function corresponding to the given key for this workspace, or null if no function is registered.

    • Finds the top-level blocks and returns them. Blocks are optionally sorted by position; top to bottom (with slight LTR or RTL bias).

      Parameters

      • ordered: boolean

        Sort the list if true.

      Returns Blockly.Block[]

      The top-level block objects.

    • Finds the top-level bounded elements and returns them.

      Returns IBoundedElement[]

      The top-level bounded elements.

    • Finds the top-level comments and returns them. Comments are optionally sorted by position; top to bottom (with slight LTR or RTL bias).

      Parameters

      • ordered: boolean

        Sort the list if true.

      Returns Blockly.WorkspaceComment[]

      The top-level comment objects.

    • Gets the undo stack for workplace.

      Returns Abstract[]

      undo stack

    • Find the variable by the given name and return it. Return null if not found.

      Parameters

      • name: string

        The name to check for.

      • Optionalopt_type: string

        The type of the variable. If not provided it defaults to the empty string, which is a specific type.

      Returns Blockly.VariableModel

      The variable with the given name.

    • Find the variable by the given ID and return it. Return null if not found.

      Parameters

      • id: string

        The ID to check for.

      Returns Blockly.VariableModel

      The variable with the given ID.

    • Find the variable with the specified type. If type is null, return list of variables with empty string type.

      Parameters

      • type: string

        Type of the variables to find.

      Returns Blockly.VariableModel[]

      The sought after variables of the passed in type. An empty array if none are found.

    • Return all variable types.

      Returns string[]

      List of variable types.

    • Find all the uses of the given variable, which is identified by ID.

      Parameters

      • id: string

        ID of the variable to find.

      Returns Blockly.Block[]

      Array of block usages.

    • Returns the horizontal offset of the workspace. Intended for LTR/RTL compatibility in XML.

      Returns number

      Width.

    • Checks if the workspace has any limits on the maximum number of blocks, or the maximum number of blocks of specific types.

      Returns boolean

      True if it has block limits, false otherwise.

    • Highlight or unhighlight a block in the workspace. Block highlighting is often used to visually mark blocks currently being executed.

      Parameters

      • id: string

        ID of block to highlight/unhighlight, or null for no block (used to unhighlight all blocks).

      • Optionalopt_state: boolean

        If undefined, highlight specified block and automatically unhighlight all others. If true or false, manually highlight/unhighlight the specified block.

      Returns void

    • Check if there is remaining capacity for blocks of the given counts to be created. If the total number of blocks represented by the map is more than the total remaining capacity, it returns false. If a type count is more than the remaining capacity for that type, it returns false.

      Parameters

      • typeCountsMap: Object

        A map of types to counts (usually representing blocks to be created).

      Returns boolean

      True if there is capacity for the given map, false otherwise.

    • Is this workspace draggable?

      Returns boolean

      True if this workspace may be dragged.

    • Is the user currently dragging a block or scrolling the flyout/workspace?

      Returns boolean

      True if currently dragging or scrolling.

    • Is this workspace movable?

      This means the user can reposition the X Y coordinates of the workspace through input. This can be through scrollbars, scroll wheel, dragging, or through zooming with the scroll wheel or pinch (since the zoom is centered on the mouse position). This does not include zooming with the zoom controls since the X Y coordinates are decided programmatically.

      Returns boolean

      True if the workspace is movable, false otherwise.

    • Is this workspace movable horizontally?

      Returns boolean

      True if the workspace is movable horizontally, false otherwise.

    • Is this workspace movable vertically?

      Returns boolean

      True if the workspace is movable vertically, false otherwise.

    • Getter for isVisible

      Returns boolean

      Whether the workspace is visible. False if the workspace has been hidden by calling setVisible(false).

    • Mark this workspace as the currently focused main workspace.

      Returns void

    • Fires a viewport event if events are enabled and there is a change in viewport values.

      Returns void

    • Track a drag of an object on this workspace.

      Parameters

      • e: Event

        Mouse move event.

      Returns Blockly.utils.Coordinate

      New location of object.

    • Obtain a newly created block.

      Parameters

      • prototypeName: string

        Name of the language object containing type-specific functions for this block.

      • Optionalopt_id: string

        Optional ID. Use this ID if provided, otherwise create a new ID.

      Returns Blockly.Block

      The created block.

    • Paste the provided block onto the workspace.

      Parameters

      • xmlBlock: Element | DocumentFragment

        XML block element or an empty DocumentFragment if the block was an insertion marker.

      Returns void

    • Make a list of all the delete areas for this workspace.

      Returns void

      Use workspace.recordDragTargets. (2021 June)

    • Make a list of all the delete areas for this workspace.

      Returns void

    • Refresh all blocks on the workspace after a theme update.

      Returns void

    • Refresh the toolbox unless there's a drag in progress.

      Returns void

    • Register a callback function associated with a given key, for clicks on buttons and labels in the flyout. For instance, a button specified by the XML should be matched by a call to registerButtonCallback("CREATE_VARIABLE", yourCallbackFunction).

      Parameters

      • key: string

        The name to use to look up this function.

      • func: (_0: Blockly.FlyoutButton) => any

        The function to call when the given button is clicked.

      Returns void

    • Register a callback function associated with a given key, for populating custom toolbox categories in this workspace. See the variable and procedure categories as an example.

      Parameters

      • key: string

        The name to use to look up this function.

      • func: (_0: Blockly.Workspace) => Element[]

        The function to call when the given toolbox category is opened.

      Returns void

    • The number of blocks that may be added to the workspace before reaching the maxBlocks.

      Returns number

      Number of blocks left.

    • The number of blocks of the given type that may be added to the workspace before reaching the maxInstances allowed for that type.

      Parameters

      • type: string

        Type of block to return capacity for.

      Returns number

      Number of blocks of type left.

    • Delete a block off this workspace with the specified ID.

      Parameters

      • id: string

        ID of block to delete.

      Returns void

    • Remove a callback for a click on a button in the flyout.

      Parameters

      • key: string

        The name associated with the callback function.

      Returns void

    • Stop listening for this workspace's changes.

      Parameters

      • func: Function

        Function to stop calling.

      Returns void

    • Remove a callback for a click on a custom category's name in the toolbox.

      Parameters

      • key: string

        The name associated with the callback function.

      Returns void

    • Removes a block from the list of top blocks.

      Parameters

      Returns void

    • Removes a bounded element from the list of top bounded elements.

      Parameters

      Returns void

    • Remove a block from the list of blocks keyed by type.

      Parameters

      Returns void

    • Rename a variable by updating its name in the variable map. Update the flyout to show the renamed variable immediately.

      Parameters

      • id: string

        ID of the variable to rename.

      • newName: string

        New variable name.

      Returns void

    • Render all blocks in workspace.

      Returns void

    • Called at the end of a workspace drag to take the contents out of the drag surface and put them back into the workspace SVG. Does nothing if the workspace drag surface is not enabled.

      Returns void

    • Resize and reposition all of the workspace chrome (toolbox, trash, scrollbars etc.) This should be called when something changes that requires recalculating dimensions and positions of the trash, zoom, toolbox, etc. (e.g. window resize).

      Returns void

    • If enabled, resize the parts of the workspace that change when the workspace contents (e.g. block positions) change. This will also scroll the workspace contents if needed.

      Returns void

    • Scroll the workspace to a specified offset (in pixels), keeping in the workspace bounds. See comment on workspaceSvg.scrollX for more detail on the meaning of these values.

      Parameters

      • x: number

        Target X to scroll to.

      • y: number

        Target Y to scroll to.

      Returns void

    • Center the workspace.

      Returns void

    • Set a block on this workspace with the specified ID.

      Parameters

      • id: string

        ID of block to set.

      • block: Blockly.Block

        The block to set.

      Returns void

    • Caches the width and height of the workspace's parent SVG element for use with getSvgMetrics.

      Parameters

      • width: number

        The width of the parent SVG element.

      • height: number

        The height of the parent SVG element

      Returns void

    • Add the cursor SVG to this workspaces SVG group.

      Parameters

      • cursorSvg: SVGElement

        The SVG root of the cursor to be added to the workspace SVG group.

      Returns void

    • Add the marker SVG to this workspaces SVG group.

      Parameters

      • markerSvg: SVGElement

        The SVG root of the marker to be added to the workspace SVG group.

      Returns void

    • Sets the metrics manager for the workspace.

      Parameters

      Returns void

    • Save resize handler data so we can delete it later in dispose.

      Parameters

      • handler: Data

        Data that can be passed to eventHandling.unbind.

      Returns void

    • Update whether this workspace has resizes enabled. If enabled, workspace will resize when appropriate. If disabled, workspace will not resize until re-enabled. Use to avoid resizing during a batch operation, for performance.

      Parameters

      • enabled: boolean

        Whether resizes should be enabled.

      Returns void

    • Set the workspace's zoom factor.

      Parameters

      • newScale: number

        Zoom factor. Units: (pixels / workspaceUnit).

      Returns void

    • Set the workspace theme object. If no theme is passed, default to the Blockly.Themes.Classic theme.

      Parameters

      Returns void

    • Called at the beginning of a workspace drag to move contents of the workspace to the drag surface. Does nothing if the drag surface is not enabled.

      Returns void

    • Set the map of all variables on the workspace.

      Parameters

      Returns void

    • Toggles the visibility of the workspace. Currently only intended for main workspace.

      Parameters

      • isVisible: boolean

        True if workspace should be visible.

      Returns void

    • Show the context menu for the workspace.

      Parameters

      Returns void

    • Start tracking a drag of an object on this workspace.

      Parameters

      Returns void

    • Translate this workspace to new coordinates.

      Parameters

      • x: number

        Horizontal translation, in pixel units relative to the top left of the Blockly div.

      • y: number

        Vertical translation, in pixel units relative to the top left of the Blockly div.

      Returns void

    • Undo or redo the previous action.

      Parameters

      • redo: boolean

        False if undo, true if redo.

      Returns void

    • Mark the inverse screen CTM as dirty.

      Returns void

    • Resizes and repositions workspace chrome if the page has a new scroll position.

      Returns void

    • Modify the block tree on the existing toolbox.

      Parameters

      • toolboxDef: ToolboxDefinition

        DOM tree of toolbox contents, string of toolbox contents, or JSON representing toolbox definition.

      Returns void

    • Zooms the workspace in or out relative to/centered on the given (x, y) coordinate.

      Parameters

      • x: number

        X coordinate of center, in pixel units relative to the top-left corner of the parentSVG.

      • y: number

        Y coordinate of center, in pixel units relative to the top-left corner of the parentSVG.

      • amount: number

        Amount of zooming. The formula for the new scale is newScale = currentScale * (scaleSpeed^amount). scaleSpeed is set in the workspace options. Negative amount values zoom out, and positive amount values zoom in.

      Returns void

    • Zooming the blocks centered in the center of view with zooming in or out.

      Parameters

      • type: number

        Type of zooming (-1 zooming out and 1 zooming in).

      Returns void

    • Zoom the blocks to fit in the workspace if possible.

      Returns void