API Docs for:
Show:

Client Class

Defined in: client.js:7
Module: client

The client file

Methods

* Draw LifeLines

(
  • event
  • currentDoi
)

Defined in client.js:737

Draws a person's lifeLine from event to event

Parameters:

  • event Event

    Event in a persons Life

  • currentDoi Number

    maximal DOI value

* generate 1-person-blocks

()

Defined in client.js:505

Generate 1-person-blocks for persons without relationships, preprocess data

* generate blocks

()

Defined in client.js:475

Generate blocks of relationships

* parse a persons Life into Events

(
  • person
)

Defined in client.js:647

Sorts a persons Life into chronological events and assigns them canvas coordinates.

Parameters:

  • person Person

    a person of a block

* sort blocks

()

Defined in client.js:587

Determine the block order (global layout)

*draw persons of a block

(
  • a
)

Defined in client.js:694

Draws Lifelines of a Block

Parameters:

  • a Person

    person in the block Person

*drawAnnotationSymbol

(
  • EventAnnotation
)

Defined in client.js:812

Draws a Star on a persons Lifeline, if a special event happened in a persons life.

Parameters:

  • EventAnnotation Event

    of a person

*drawDropLines

()

Defined in client.js:832

Draws droplines from parents to children, handels different visibility cases between involved people, and fades lines accordingly.

*drawTime

()

Defined in client.js:1027

Draws a timeline on at top and at the bottom of the timeline,, from Birthdate of the oldest person to the deathdate of the youngest.

*fadeInLifeLines

()

Defined in client.js:962

Fades in invisible Lifelines if the unimportant persons is in a relationship with a more important person.

*write text on LifeLine

()

Defined in client.js:762

Writes a person's name and DOI value on their lifeline

arrayDiff

(
  • a
  • b
)

Defined in client.js:53

Parameters:

  • a Array
  • b Array

Returns:

a without the objects of b

cmpBirthDates

(
  • a
  • b
)
Number

Defined in client.js:163

Compare birth dates of persons for sorting

Parameters:

Returns:

Number:

cmpDates

(
  • a
  • b
)
Number

Defined in client.js:150

Compare dates for sorting

Parameters:

  • a Date
  • b Date

Returns:

Number:

cmpEvents

(
  • a
  • b
)
Number

Defined in client.js:137

Compare events for sorting

Parameters:

  • a Event
  • b Event

Returns:

Number:

cmpNumbers

(
  • a
  • b
)
Number

Defined in client.js:124

Compare numbers for sorting

Parameters:

  • a Number
  • b Number

Returns:

Number:

copyArray

(
  • a
)
Array

Defined in client.js:188

Copy an array (copy every object in the array)

Parameters:

  • a Array

Returns:

Array:

copyObject

(
  • o
)
Object

Defined in client.js:176

Copy an object

Parameters:

  • o Object

Returns:

Object:

drawAnnotation

(
  • AnnotationSymbol
)

Defined in client.js:1150

Draws annotation textbox. Calculates textbox position and text breaks.

Parameters:

  • AnnotationSymbol Path

    includes Position and AnnotationData

drawEverything

()

Defined in client.js:626

As the name says. Must be called every time the layout changes

fillBlock

(
  • relId
  • block
)

Defined in client.js:383

Insert conjugal relationship and the involved persons into the block; then go to their other conjugal relationships, add them to the block, ... and so on, until the block is completed.

Parameters:

  • relId Number
  • block Block

fullRelationCurveTo

(
  • path
  • endPoint
  • curveHeight
)

Defined in client.js:319

Draws a "full relation curve", meaning two curves that are connected by a straight line

Parameters:

  • path paper.Path
  • endPoint paper.Point
  • curveHeight Number

getX

(
  • date
)
Number

Defined in client.js:346

Parameters:

  • date Date

Returns:

Number:

x-position on screen for date

otherPersonId

(
  • p
  • rel
)
Number

Defined in client.js:220

Parameters:

Returns:

Number:

id of other person in the relationship

personColor

(
  • person
)
paper.Color

Defined in client.js:362

Parameters:

Returns:

paper.Color:

color of person's line, determined by doi and sex

relationCurveTo

(
  • path
  • endPoint
)

Defined in client.js:303

Draws a curve for the current path to endPoint (used in fullRelationCurveTo)

Parameters:

  • path paper.Path
  • endPoint paper.Point

resetDois

(
  • value
)

Defined in client.js:427

Set doi values of all persons to value

Parameters:

  • value Number

selectMatchingLine

()

Defined in client.js:1247

Conducts person search, and sets this person in focus.

setDois

(
  • p
  • currentDoi
)

Defined in client.js:1078

This recursive function calculates the DOI values for every person, starting at the person in focus.

Parameters:

  • p Person

    Person in focus

  • currentDoi Number

    maximal DOI value

setFocusLine

(
  • line
)

Defined in client.js:1066

Sets the clicked LifeLine in focus, starts the line animation, and starts calculation of Dois.

Parameters:

  • line Path

    The lifeline which is new Focus point.

sign

(
  • x
)
Number

Defined in client.js:208

Sign function

Parameters:

  • x Number

Returns:

Number:

sortBlockPersons

()

Defined in client.js:547

Sort the persons of a block by birth date

Events

db_data

Defined in client.js:248

Called when database data is received

Event Payload:

  • data Object

    contains the database content from the server

keypress

Defined in client.js:1274

Starts person search on key "enter".

onFrame Animation

Defined in client.js:1343

If animation Event takes place, animate LifeLine

onMouseDown

Defined in client.js:1299

Starts different interactions, depending on which object was clicked.

onresize

Defined in client.js:1368

If window changes size resize and redraw TimeNets

show_invisible_check

Defined in client.js:1288

Displays invisible lines

timenet_list

Defined in client.js:235

Called when information about available timenets is received from the server

Event Payload:

  • data Object

    contains the list of timenet ids