Delete

@objcMembers public final class Delete: BlocklyEvent

Event fired when a block is removed from the workspace.

  • The event type for BlocklyEvent.Delete objects.

    Declaration

    Swift

    public static let EVENT_TYPE = "delete"
  • The XML serialization of all blocks deleted by this event.

    Declaration

    Swift

    public let oldXML: String
  • The list of all block ids for all blocks deleted by this event.

    Declaration

    Swift

    public let blockIDs: [String]
  • Constructs a BlocklyEvent.Delete, signifying the removal of a block from the workspace.

    Throws

    BlocklyError: Thrown if the given block tree could not be serialized into xml.

    Declaration

    Swift

    public init(workspace: Workspace, block: Block) throws
  • Constructs a BlocklyEvent.Delete from the JSON serialized representation.

    Throws

    BlocklyError: Thrown when the JSON could not be parsed into a BlocklyEvent.Delete object.

    Declaration

    Swift

    public init(json: [String: Any]) throws
  • Declaration

    Swift

    public override func toJSON() throws -> [String: Any]