blockly > Ereignisse > Ausgewählt > (constructor)
Events.Selected.(constructor)
Erstellt eine neue Instanz der Klasse Selected
.
Unterschrift:
constructor(opt_oldElementId?: string | null, opt_newElementId?: string | null, opt_workspaceId?: string);
Parameter
Parameter |
Typ |
Beschreibung |
opt_oldElementId |
string | null |
Optional: Die ID des zuvor ausgewählten Elements. Null, wenn zuletzt kein Element ausgewählt wurde. Für ein leeres Ereignis nicht definiert. |
opt_newElementId |
string | null |
Optional: Die ID des ausgewählten Elements. Null, wenn derzeit kein Element ausgewählt ist (Auswahl aufheben). Für ein leeres Ereignis nicht definiert. |
opt_workspaceId |
String |
Optional: Die Workspace-ID für dieses Ereignis. Null, wenn zuvor kein Element ausgewählt wurde. Für ein leeres Ereignis nicht definiert. |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-11-22 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-11-22 (UTC)."],[[["The `Selected` class constructor creates a new instance to manage selection events in Blockly workspaces."],["It accepts optional parameters for the previously selected element ID (`opt_oldElementId`), the newly selected element ID (`opt_newElementId`), and the workspace ID (`opt_workspaceId`)."],["These parameters help track selection changes and can be null or undefined depending on the selection state or for blank event initialization."]]],["The `Selected` class constructor creates a new instance, capturing element selection changes. It accepts optional parameters: `opt_oldElementId` (ID of the previously selected element, can be null), `opt_newElementId` (ID of the currently selected element, can be null), and `opt_workspaceId` (the workspace's identifier). Null values indicate no element was previously or is currently selected, while undefined indicates a blank event. These parameters detail the selection change and its context within a specific workspace.\n"]]