Class: PinSupport

PinSupport

represents pin support

new PinSupport(params)

Pin support [GeomObj]
This:
Parameters:
Name Type Argument Description
params Object <optional>
parameters, see below
Properties
Name Type Argument Description
x number <optional>
=0.] x coordinate of supprt tip [pixel]
y number <optional>
=0.] y coordinate of supprt tip [pixel]
size number <optional>
=20.] height of the support [pixel]
angle number <optional>
=0.] the support will be rotated by angle [deg]
sliding boolean <optional>
=true] if the support is sliding or not
gap number <optional>
=5.] gap between triangle and line (sliding symbol) [pixel]
ratio number <optional>
=0.7] width/height of the triangle [-]
Properties:
Name Type Description
sliding boolean true for sliding pins and false for fixed pins
ratio number width/height of the pin
sliding boolean true for sliding pins and false for fixed pins
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 328

Extends

Methods

copy(shifts)

Copy receiver
Parameters:
Name Type Description
shifts Array.<Array.<number>> array of [x,y] couple of copies shifts
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 160

cos()

Compute cos from stored angle
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 83

makeCopy() → {Raphael.fn.PinSupport}

Returns copy of receiver
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 380
Returns:
copy of receiver
Type
Raphael.fn.PinSupport

rotate(phi)

Rotate receiver by given angle (this.angle += phi)
Parameters:
Name Type Description
phi number angle of rotation
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 144

setAngle(phi)

Set angle of receiver (this.angle = phi)
Parameters:
Name Type Description
phi number angle of rotation
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 152

setPathList()

Sets svg path of receiver
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 340

setX(x)

Sets new x position of receiver (this.x = x)
Parameters:
Name Type Description
x number new x coordinate [pixel]
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 104

setXY(x, y)

Sets new x and y position of receiver (this.x = x; this.y = y)
Parameters:
Name Type Description
x number new x coordinate [pixel]
y number new y coordinate [pixel]
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 95

setY(y)

Sets new y position of receiver (this.y = y)
Parameters:
Name Type Description
y number new y coordinate [pixel]
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 112

sin()

Compute sin from stored (anti-clockwise) angle
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 77

translateX(dx)

Translate receiver in x direction (this.x += x)
Parameters:
Name Type Description
dx number distance to be translated [pixel]
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 130

translateXY(dx, dy)

Translate receiver in x and y direction (this.x += dx; this.y += dy)
Parameters:
Name Type Description
dx number distance to be translated in x direction [pixel]
dy number distance to be translated in y direction [pixel]
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 121

translateY(dy)

Translate receiver in x direction (this.y += dy)
Parameters:
Name Type Description
dy number distance to be translated [pixel]
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 137

update()

Update receiver (set this.pathList for given internal variables - x,y,angle... - as well as its copies)
Inherited From:
Source:
  • /var/www/html/software/raphaelsm/raphaelsm.src.js, line 174