Node

Simplicite.Diagram. Node

Node constructor

Constructor

new Node(desktop, data, eltopt)

Parameters:
Name Type Attributes Description
desktop Simplicite.Diagram.Desktop

desk manager

data Object

Node data { object, id, template, contents... }

elt $ <optional>

optional DOM object to synchronize

Methods

attach()

Description:
  • Attach node to a container

bind()

Description:
  • Bind

collapseContents()

Description:
  • Collapse contents

collapseFields()

Description:
  • Collapse fields

detach()

Description:
  • Detach from container

draw()

Description:
  • Draw

drawItem()

Description:
  • Draw item

isContentVisible()

Description:
  • Is content visible?

isItemVisible()

Description:
  • Is item visible?

load()

Description:
  • Load node with data

position(x, y, rel, attach)

Description:
  • Set/get position of element

Parameters:
Name Type Description
x number

Horizontal coordinate

y number

Vertical coordinate

rel boolean

Relative?

attach boolean

Attach to parent container?

redraw()

Description:
  • Redraw

remove()

Description:
  • Remove

setLabel(label)

Description:
  • Set label

Parameters:
Name Type Description
label string

Label

size(w, h)

Description:
  • Set/Get size of node

Parameters:
Name Type Description
w number

Width

h number

Height

style()

Description:
  • Style

toggleMenu()

Description:
  • Toggle menu