Ir al contenido

Placeholder

Defined in: panel/Placeholder.ts:11

GoJS-compatible Placeholder. A special GraphObject used inside group templates that automatically sizes itself to the group’s member bounds (plus padding). It renders nothing.

new Placeholder(): Placeholder

Placeholder

GraphObject.constructor

optional actionCancel?: (e, obj) => void

Defined in: panel/GraphObject.ts:86

InputEvent

GraphObject

void

GraphObject.actionCancel


optional actionDown?: (e, obj) => void

Defined in: panel/GraphObject.ts:83

InputEvent

GraphObject

void

GraphObject.actionDown


optional actionMove?: (e, obj) => void

Defined in: panel/GraphObject.ts:84

InputEvent

GraphObject

void

GraphObject.actionMove


optional actionUp?: (e, obj) => void

Defined in: panel/GraphObject.ts:85

InputEvent

GraphObject

void

GraphObject.actionUp


optional click?: (e, obj) => void

Defined in: panel/GraphObject.ts:68

InputEvent

GraphObject

void

GraphObject.click


optional contextClick?: (e, obj) => void

Defined in: panel/GraphObject.ts:70

InputEvent

GraphObject

void

GraphObject.contextClick


optional doubleClick?: (e, obj) => void

Defined in: panel/GraphObject.ts:69

InputEvent

GraphObject

void

GraphObject.doubleClick


isActionable: boolean = false

Defined in: panel/GraphObject.ts:82

GoJS-compatible: when true, ActionTool dispatches actionDown/actionMove/actionUp/actionCancel on this object for mouse-down-move-up gestures starting on it — for building controls (buttons, sliders) that handle their own gesture without a new Tool.

GraphObject.isActionable


optional mouseEnter?: (e, obj, prev) => void

Defined in: panel/GraphObject.ts:71

InputEvent

GraphObject

GraphObject | null

void

GraphObject.mouseEnter


optional mouseLeave?: (e, obj, prev) => void

Defined in: panel/GraphObject.ts:72

InputEvent

GraphObject

GraphObject | null

void

GraphObject.mouseLeave


optional mouseOut?: (e, obj) => void

Defined in: panel/GraphObject.ts:74

InputEvent

GraphObject

void

GraphObject.mouseOut


optional mouseOver?: (e, obj) => void

Defined in: panel/GraphObject.ts:73

InputEvent

GraphObject

void

GraphObject.mouseOver


parentPanel: GraphObject | null = null

Defined in: panel/GraphObject.ts:89

The panel this object belongs to (set when added). Used for ofObject resolution.

GraphObject.parentPanel


portId: string = ''

Defined in: panel/GraphObject.ts:92

GoJS-compatible: If non-empty, this object acts as a port on its part.

GraphObject.portId

get actualSize(): Size

Defined in: panel/GraphObject.ts:481

The actual size computed during layout.

Size

GraphObject.actualSize


get alignment(): Spot | null

Defined in: panel/GraphObject.ts:491

The alignment spot for Spot panels.

Spot | null

set alignment(value): void

Defined in: panel/GraphObject.ts:495

Spot | null

void

GraphObject.alignment


get alignmentFocus(): Spot | null

Defined in: panel/GraphObject.ts:553

GoJS-compatible: The spot within this object used for alignment/placement.

Spot | null

set alignmentFocus(value): void

Defined in: panel/GraphObject.ts:557

Spot | null

void

GraphObject.alignmentFocus


get angle(): number

Defined in: panel/GraphObject.ts:414

The rotation angle in degrees.

number

set angle(value): void

Defined in: panel/GraphObject.ts:418

number

void

GraphObject.angle


get bindings(): readonly Binding[]

Defined in: panel/GraphObject.ts:104

GoJS-compatible: The bindings attached to this graph object.

readonly Binding[]

GraphObject.bindings


get column(): number

Defined in: panel/GraphObject.ts:524

GoJS-compatible: The column index for table panels.

number

set column(value): void

Defined in: panel/GraphObject.ts:528

number

void

GraphObject.column


get columnSpan(): number

Defined in: panel/GraphObject.ts:542

GoJS-compatible: The number of columns this object spans.

number

set columnSpan(value): void

Defined in: panel/GraphObject.ts:546

number

void

GraphObject.columnSpan


get copyable(): boolean

Defined in: panel/GraphObject.ts:635

GoJS-compatible: Whether this object is included when copying its part.

boolean

set copyable(value): void

Defined in: panel/GraphObject.ts:639

boolean

void

GraphObject.copyable


get cursor(): string

Defined in: panel/GraphObject.ts:423

GoJS-compatible: The cursor displayed when hovering over this object.

string

set cursor(value): void

Defined in: panel/GraphObject.ts:427

string

void

GraphObject.cursor


get desiredSize(): Size | null

Defined in: panel/GraphObject.ts:432

The desired size. If null, natural size is used.

Size | null

set desiredSize(value): void

Defined in: panel/GraphObject.ts:436

Size | null

void

GraphObject.desiredSize


get height(): number

Defined in: panel/GraphObject.ts:462

GoJS-compatible: the last explicitly-set desired height, or NaN if never set.

number

set height(value): void

Defined in: panel/GraphObject.ts:466

number

void

GraphObject.height


get isShadowed(): boolean

Defined in: panel/GraphObject.ts:578

GoJS-compatible: Whether this object casts a drop shadow.

boolean

set isShadowed(value): void

Defined in: panel/GraphObject.ts:582

boolean

void

GraphObject.isShadowed


get isVisibleObject(): boolean

Defined in: panel/GraphObject.ts:379

GoJS-compatible: Whether this object and all of its ancestors are visible.

boolean

GraphObject.isVisibleObject


get margin(): Margin | null

Defined in: panel/GraphObject.ts:500

The margin around this object.

Margin | null

set margin(value): void

Defined in: panel/GraphObject.ts:505

GoJS-compatible: a plain number sets a uniform margin on all four sides.

number | Margin | null

void

GraphObject.margin


get name(): string

Defined in: panel/GraphObject.ts:95

The name of this graph object, used for findObject() lookups.

string

set name(value): void

Defined in: panel/GraphObject.ts:99

string

void

GraphObject.name


get opacity(): number

Defined in: panel/GraphObject.ts:405

The opacity of this object (0-1).

number

set opacity(value): void

Defined in: panel/GraphObject.ts:409

number

void

GraphObject.opacity


get padding(): number

Defined in: panel/Placeholder.ts:15

Extra space around the members’ bounds.

number

set padding(value): void

Defined in: panel/Placeholder.ts:19

number

void


get parent(): GraphObject | null

Defined in: panel/GraphObject.ts:389

GoJS-compatible: The parent panel of this object (or null).

GraphObject | null

GraphObject.parent


get part(): Part | null

Defined in: panel/GraphObject.ts:394

GoJS-compatible: The Part that contains this object (or null).

Part | null

GraphObject.part


get pickable(): boolean

Defined in: panel/GraphObject.ts:626

GoJS-compatible: Whether this object can be hit-tested.

boolean

set pickable(value): void

Defined in: panel/GraphObject.ts:630

boolean

void

GraphObject.pickable


get position(): object

Defined in: panel/GraphObject.ts:471

The position within the parent panel.

object

x: number

y: number

GraphObject.position


get row(): number

Defined in: panel/GraphObject.ts:515

GoJS-compatible: The row index for table panels.

number

set row(value): void

Defined in: panel/GraphObject.ts:519

number

void

GraphObject.row


get rowSpan(): number

Defined in: panel/GraphObject.ts:533

GoJS-compatible: The number of rows this object spans.

number

set rowSpan(value): void

Defined in: panel/GraphObject.ts:537

number

void

GraphObject.rowSpan


get scale(): number

Defined in: panel/GraphObject.ts:564

GoJS-compatible: The scale of this object relative to its normal size.

number

set scale(value): void

Defined in: panel/GraphObject.ts:568

number

void

GraphObject.scale


get shadow(): string

Defined in: panel/GraphObject.ts:614

GoJS-compatible: Alias for shadowColor.

string

set shadow(value): void

Defined in: panel/GraphObject.ts:618

string

void

GraphObject.shadow


get shadowBlur(): number

Defined in: panel/GraphObject.ts:605

GoJS-compatible: The drop shadow blur radius.

number

set shadowBlur(value): void

Defined in: panel/GraphObject.ts:609

number

void

GraphObject.shadowBlur


get shadowColor(): string

Defined in: panel/GraphObject.ts:587

GoJS-compatible: The drop shadow color.

string

set shadowColor(value): void

Defined in: panel/GraphObject.ts:591

string

void

GraphObject.shadowColor


get shadowOffset(): object

Defined in: panel/GraphObject.ts:596

GoJS-compatible: The drop shadow offset.

object

x: number

y: number

set shadowOffset(value): void

Defined in: panel/GraphObject.ts:600

number

number

void

GraphObject.shadowOffset


get visible(): boolean

Defined in: panel/GraphObject.ts:370

Whether this object is visible.

boolean

set visible(value): void

Defined in: panel/GraphObject.ts:374

boolean

void

GraphObject.visible


get width(): number

Defined in: panel/GraphObject.ts:453

GoJS-compatible: the last explicitly-set desired width, or NaN if never set — NOT the object’s current rendered size. Falling back to _actualSize here (as this used to) makes every measure() override (Shape/TextBlock/Picture/Panel, which all gate their real measurement behind !Number.isNaN(this.width)) permanently “lock onto” whatever size an earlier — possibly premature, e.g. before a data binding applied the real text — layout pass happened to produce, since that stale actualSize then reads back as “an explicit width was set” on every later pass and skips remeasuring for good. Those callers must check for NaN specifically, not > 0 — a Binding that legitimately resolves to 0 (e.g. a 0%-progress bar) is still an explicit width.

number

set width(value): void

Defined in: panel/GraphObject.ts:457

number

void

GraphObject.width

addBinding(binding): this

Defined in: panel/GraphObject.ts:119

Add a binding to this graph object (keeps existing bindings).

Binding

this

GraphObject.addBinding


applyBindings(nodeData): number

Defined in: panel/GraphObject.ts:185

Apply all bindings from model data to this graph object.

NodeData

number

GraphObject.applyBindings


clone(): this

Defined in: panel/GraphObject.ts:737

Create a deep copy of this GraphObject. Subclasses override to copy their specific properties.

this

GraphObject.clone


containsPoint(px, py): boolean

Defined in: panel/GraphObject.ts:675

Check if a point is inside this object’s area (for hit testing).

number

number

boolean

GraphObject.containsPoint


draw(): void

Defined in: panel/Placeholder.ts:44

Draw this object at its computed position and size.

void

GraphObject.draw


getBounds(): Rect

Defined in: panel/GraphObject.ts:685

Get the bounds of this object within the panel coordinate space.

Rect

GraphObject.getBounds


measure(): Size

Defined in: panel/Placeholder.ts:23

Measure the natural size of this object. Returns the size this object would like to occupy.

Size

GraphObject.measure


measureWithMargin(): Size

Defined in: panel/GraphObject.ts:663

Compute the effective size after applying margin.

Size

GraphObject.measureWithMargin


removeBinding(targetProperty): boolean

Defined in: panel/GraphObject.ts:125

Remove a binding by target property. Returns true if removed.

string

boolean

GraphObject.removeBinding


setActualSize(width, height): void

Defined in: panel/GraphObject.ts:486

Set the actual size during layout.

number

number

void

GraphObject.setActualSize


setBinding(binding): this

Defined in: panel/GraphObject.ts:112

GoJS-compatible: Set a binding on this graph object, replacing any existing binding with the same target property.

Binding

this

GraphObject.setBinding


setPosition(x, y): void

Defined in: panel/GraphObject.ts:476

Set the position within the parent panel.

number

number

void

GraphObject.setPosition


theme(targetprop, sourceprop?, themeSource?, conv?, themeconv?): this

Defined in: panel/GraphObject.ts:137

GoJS-compatible: add a ThemeBinding from a literal Theme property name to targetprop, e.g. .theme("stroke", "text") assigns stroke to the current theme’s colors.text.

string

string

string | null

(value, data) => unknown

(value, target) => unknown

this

GraphObject.theme


themeData(targetprop, sourceprop?, themeSource?, conv?, themeconv?): this

Defined in: panel/GraphObject.ts:153

GoJS-compatible: add a ThemeBinding whose theme key comes from a data property’s value, e.g. .themeData("fill", "state") looks up data.state and uses that as the colors key.

string

string

string | null

(value, data) => unknown

(value, target) => unknown

this

GraphObject.themeData


themeModel(targetprop, sourceprop?, themeSource?, conv?, themeconv?): this

Defined in: panel/GraphObject.ts:171

GoJS-compatible: like themeData, but sourced from model-wide data. graphojs has no Model.modelData, so this currently behaves exactly like themeData (resolved against the part’s own data instead).

string

string

string | null

(value, data) => unknown

(value, target) => unknown

this

GraphObject.themeModel


static make(builder, …args): Panel

Defined in: panel/GraphObject.ts:203

GoJS-compatible static factory method.

Usage: const $ = go.GraphObject.make; const shape = $(go.Shape, “RoundedRectangle”, { fill: “white”, stroke: “gray” }); const panel = $(go.Panel, “Auto”, shape, $(go.TextBlock, “Hello”));

string

unknown[]

Panel

GraphObject.make

static make(ctor, …args): Panel

Defined in: panel/GraphObject.ts:204

GoJS-compatible static factory method.

Usage: const $ = go.GraphObject.make; const shape = $(go.Shape, “RoundedRectangle”, { fill: “white”, stroke: “gray” }); const panel = $(go.Panel, “Auto”, shape, $(go.TextBlock, “Hello”));

typeof Node | typeof Link | typeof Group

unknown[]

Panel

GraphObject.make

static make<T>(ctor, …args): T

Defined in: panel/GraphObject.ts:205

GoJS-compatible static factory method.

Usage: const $ = go.GraphObject.make; const shape = $(go.Shape, “RoundedRectangle”, { fill: “white”, stroke: “gray” }); const panel = $(go.Panel, “Auto”, shape, $(go.TextBlock, “Hello”));

T

(…args) => T

unknown[]

T

GraphObject.make