Group

Group

{Array} Group Collection of Line, Circle, Rectangle & Text objects

Constructor

new Group()

Description:
  • Create Group object
Source:
Properties:
Name Type Description
point Point X & Y axis coordinates
lines Array Collection of Line objects
circles Array Collection of Circle objects
ellipses Array Collection of Ellipse objects
rectangles Array Collection of Rectangle objects
roundedRectangles Array Collection of Rounded Rectangle objects
text Array Collection of Text objects
canvas HTMLCanvasElement 2D canvas context
template Template Canvas Lab Template object

Methods

canvas(value)

Description:
  • Set canvas value
Source:
Parameters:
Name Type Description
value string Canvas id

canvas() → {string}

Description:
  • Get canvas value
Source:
Returns:
Canvas id
Type
string

circles() → {Circles}

Description:
  • Get's circles
Source:
Returns:
Circles collection
Type
Circles

draw(canvas)

Description:
  • Draw this group
Source:
Parameters:
Name Type Description
canvas string Canvas Id

ellipses() → {Ellipses}

Description:
  • Get's ellipses
Source:
Returns:
Ellipses collection
Type
Ellipses

lines() → {Lines}

Description:
  • Get's lines
Source:
Returns:
Lines collection
Type
Lines

point(value)

Description:
  • Set point
Source:
See:
Parameters:
Name Type Description
value Point X & Y coordinates

point() → {Point}

Description:
  • Get point
Source:
See:
Returns:
X & Y coordinates
Type
Point

pop(object)

Description:
  • Pops an object out of this group
Source:
Parameters:
Name Type Description
object Object Object; Line(s), Circle(s), Rectangle(S)

push(object)

Description:
  • Pushes an object into this group
Source:
Parameters:
Name Type Description
object Object Object; Line(s), Circle(s), Rectangle(S)

rectangles() → {Rectangles}

Description:
  • Get's rectangles
Source:
Returns:
Rectangles collection
Type
Rectangles

roundedRectangles() → {RoundedRectangles}

Description:
  • Get's rounded rectangles
Source:
Returns:
Rectangles collection
Type
RoundedRectangles

template(value)

Description:
  • Set template
Source:
See:
Parameters:
Name Type Description
value Template Template object

template() → {Template}

Description:
  • Get template
Source:
See:
Returns:
Template object
Type
Template

texts() → {Texts}

Description:
  • Get's texts
Source:
Returns:
Texts collection
Type
Texts

x(value)

Description:
  • Set x-axis value
Source:
See:
Parameters:
Name Type Description
value number X coordinate value

x() → {number}

Description:
  • Get x-axis value
Source:
See:
Returns:
X coordinate value
Type
number

y(value)

Description:
  • Set the y-axis value
Source:
See:
Parameters:
Name Type Description
value number Y coordinate value

y() → {number}

Description:
  • Get y-axis value
Source:
See:
Returns:
Y coordinate value
Type
number