Home Reference Source
public class | source

FloorplannerView2D

The View to be used by a Floorplanner to render in/interact with.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

canvas: *

public
public get
public

context: *

public
public
Private Members
private

Method Summary

Public Methods
public

returns n where -gridSize/2 < n <= gridSize/2

public

draw()

public

drawCircle(centerX: *, centerY: *, radius: *, fillColor: *)

public

drawCorner(corner: *)

public

drawEdge(edge: *, hover: *)

public

drawEdgeLabel(edge: *)

public
public
public

drawLine(startX: *, startY: *, endX: *, endY: *, width: *, color: *)

public
public

drawPolygon(xArr: *, yArr: *, fill: *, fillColor: *, stroke: *, strokeColor: *, strokeWidth: *)

public

drawRoom(room: *)

public

drawTarget(x: *, y: *, lastNode: *)

public

drawTextLabel(label: *, x: *, y: *, textcolor: string, strokecolor: string, style: string)

public

drawWall(wall: *)

public

drawWallLabels(wall: *)

public
public

Public Constructors

public constructor() source

Public Members

public canvas: * source

public canvasElement: * source

public get carbonSheet: * source

public context: * source

public floorplan: * source

public viewmodel: * source

Private Members

private _carbonsheet: * source

Public Methods

public calculateGridOffset(n: *): * source

returns n where -gridSize/2 < n <= gridSize/2

Params:

NameTypeAttributeDescription
n *

Return:

*

public draw() source

public drawCircle(centerX: *, centerY: *, radius: *, fillColor: *) source

Params:

NameTypeAttributeDescription
centerX *
centerY *
radius *
fillColor *

public drawCorner(corner: *) source

Params:

NameTypeAttributeDescription
corner *

public drawEdge(edge: *, hover: *) source

Params:

NameTypeAttributeDescription
edge *
hover *

public drawEdgeLabel(edge: *) source

Params:

NameTypeAttributeDescription
edge *

public drawEdgeLabelExterior(edge: *) source

Params:

NameTypeAttributeDescription
edge *

public drawGrid() source

public drawLine(startX: *, startY: *, endX: *, endY: *, width: *, color: *) source

Params:

NameTypeAttributeDescription
startX *
startY *
endX *
endY *
width *
color *

public drawOriginCrossHair() source

public drawPolygon(xArr: *, yArr: *, fill: *, fillColor: *, stroke: *, strokeColor: *, strokeWidth: *) source

Params:

NameTypeAttributeDescription
xArr *
yArr *
fill *
fillColor *
stroke *
strokeColor *
strokeWidth *

public drawRoom(room: *) source

Params:

NameTypeAttributeDescription
room *

public drawTarget(x: *, y: *, lastNode: *) source

Params:

NameTypeAttributeDescription
x *
y *
lastNode *

public drawTextLabel(label: *, x: *, y: *, textcolor: string, strokecolor: string, style: string) source

Params:

NameTypeAttributeDescription
label *
x *
y *
textcolor string
  • optional
  • default: #000000
strokecolor string
  • optional
  • default: #ffffff
style string
  • optional
  • default: normal

public drawWall(wall: *) source

Params:

NameTypeAttributeDescription
wall *

public drawWallLabels(wall: *) source

Params:

NameTypeAttributeDescription
wall *

public drawWallLabelsMiddle(wall: *) source

Params:

NameTypeAttributeDescription
wall *

public handleWindowResize() source