Skip to main content

Home > @jsplumb/core > Component

Component class#

Signature:

export declare abstract class Component extends EventGenerator 

Extends: EventGenerator

Constructors#

ConstructorModifiersDescription
(constructor)(instance, params)Constructs a new instance of the Component class

Properties#

PropertyModifiersTypeDescription
_defaultTypeComponentTypeDescriptor
_hoverboolean
_typeCache{}
_typesstring[]
beforeDetachBeforeDetachInterceptor
beforeDropBeforeDropInterceptor
clone() => Component
cssClassstring
dataRecord<string, any>
defaultLabelLocationnumber | [number, number]
deletedboolean
eventsany
hnumber
hoverClassstring
hoverPaintStylePaintStyle
idstring
instanceJsPlumbInstance
lastPaintedAtstring
overlayPlacementsDictionary<Extents>
overlayPositionsDictionary<PointXY>
overlaysDictionary<Overlay>
paintStylePaintStyle
paintStyleInUsePaintStyle
parametersComponentParameters
paramsDictionary<any>
segmentnumber
typeIdstring
visibleboolean
wnumber
xnumber
ynumber

Methods#

MethodModifiersDescription
addClass(clazz, cascade)
addOverlay(overlay)
addType(typeId, params)
appendToDefaultType(obj)
applyType(t, params)
cacheTypeItem(key, item, typeId)
clearTypes(params, doNotRepaint)
destroy()
getAbsoluteOverlayPosition(overlay)
getCachedTypeItem(key, typeId)
getClass()
getData()
getDefaultOverlayKey()
getDefaultType()
getHoverPaintStyle()
getId()
getIdPrefix()
getLabel()
getLabelOverlay()
getOverlay(id)Get the Overlay with the given ID. You can optionally provide a type parameter for this method in order to get a typed return value (such as LabelOverlay, ArrowOverlay, etc), since some overlays have methods that others do not.
getOverlays()
getPaintStyle()
getType()
getTypeDescriptor()
getXY()
hasType(typeId)
hideOverlay(id)
hideOverlays()
isDetachAllowed(connection)
isDropAllowed(sourceId, targetId, scope, connection, dropEndpoint)
isHover()
isVisible()
mergeData(d)
mergeParameters(p)
reapplyTypes(params)
removeAllOverlays()
removeClass(clazz, cascade)
removeOverlay(overlayId, dontCleanup)
removeOverlays(overlays)
removeType(typeId, params)
setAbsoluteOverlayPosition(overlay, xy)
setData(d)
setHoverPaintStyle(style)
setLabel(l)
setPaintStyle(style)
setType(typeId, params)
setVisible(v)
shouldFireEvent(event, value, originalEvent)
showOverlay(id)
showOverlays()
toggleType(typeId, params)