File

src/connection-types.ts

Description

Represents one drop target and its behaviour, that can listen to the state and connect to a DOM element.

To create one, refer to SkyhookDndService.

Extends

ConnectionBase

Index

Methods

Methods

connectDropTarget
connectDropTarget(elementOrNode: Node)

This function allows you to connect a DOM node to your DropTarget. You will not usually need to call this directly; it is more easily handled by the directives.

The subscription returned is automatically unsubscribed when the connection is made. This may be immediate if the DropTarget already has a type.

Parameters :
Name Type Optional
elementOrNode Node No
Returns : Subscription
getHandlerId
getHandlerId()

Returns the drop target ID that can be used to simulate the drag and drop events with the testing backend.

Returns : any
setTypes
setTypes(type: TypeOrTypeArray)

Use this method to have a dynamically typed target. If no type has previously been set, it creates the subscription and allows the [dragSource] DOM element to be connected. If you do not need to dynamically update the type, you can set it once via the DropTargetSpec property.

See DragSource for an example of how to set a dynamic type, for it is very similar here.

Parameters :
Name Type Optional
type TypeOrTypeArray No
Returns : void

result-matching ""

    No results matching ""