Skip to main content

blockly > Events > Click

Events.Click class

Notifies listeners that some blockly element was clicked.

Signature:

export declare class Click extends UiBase 

Extends: UiBase

Constructors

Constructor

Modifiers

Description

(constructor)(opt_block, opt_workspaceId, opt_targetType)

Constructs a new instance of the Click class

Properties

Property

Modifiers

Type

Description

blockId?

string

(Optional) The ID of the block that was clicked, if a block was clicked.

targetType?

ClickTarget

(Optional) The type of element that was clicked; one of 'block', 'workspace', or 'zoom_controls'.

type

EventType

Methods

Method

Modifiers

Description

toJson()

Encode the event as JSON.