Client Class
The client file
Item Index
Methods
- * Draw LifeLines
- * generate 1-person-blocks
- * generate blocks
- * parse a persons Life into Events
- * sort blocks
- *draw persons of a block
- *drawAnnotationSymbol
- *drawDropLines
- *drawTime
- *fadeInLifeLines
- *write text on LifeLine
- arrayDiff
- cmpBirthDates
- cmpDates
- cmpEvents
- cmpNumbers
- copyArray
- copyObject
- drawAnnotation
- drawEverything
- fillBlock
- fullRelationCurveTo
- getX
- otherPersonId
- personColor
- relationCurveTo
- resetDois
- selectMatchingLine
- setDois
- setFocusLine
- sign
- sortBlockPersons
Methods
* Draw LifeLines
-
event -
currentDoi
Draws a person's lifeLine from event to event
Parameters:
-
eventEventEvent in a persons Life
-
currentDoiNumbermaximal DOI value
* generate 1-person-blocks
()
Generate 1-person-blocks for persons without relationships, preprocess data
* generate blocks
()
Generate blocks of relationships
* parse a persons Life into Events
-
person
Sorts a persons Life into chronological events and assigns them canvas coordinates.
Parameters:
-
personPersona person of a block
* sort blocks
()
Determine the block order (global layout)
*draw persons of a block
-
a
Draws Lifelines of a Block
Parameters:
-
aPersonperson in the block Person
*drawAnnotationSymbol
-
EventAnnotation
Draws a Star on a persons Lifeline, if a special event happened in a persons life.
Parameters:
-
EventAnnotationEventof a person
*drawDropLines
()
Draws droplines from parents to children, handels different visibility cases between involved people, and fades lines accordingly.
*drawTime
()
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
()
Fades in invisible Lifelines if the unimportant persons is in a relationship with a more important person.
*write text on LifeLine
()
Writes a person's name and DOI value on their lifeline
arrayDiff
-
a -
b
Parameters:
-
aArray -
bArray
Returns:
a without the objects of b
cmpBirthDates
-
a -
b
Compare birth dates of persons for sorting
Returns:
cmpDates
-
a -
b
Compare dates for sorting
Parameters:
-
aDate -
bDate
Returns:
cmpEvents
-
a -
b
Compare events for sorting
Parameters:
-
aEvent -
bEvent
Returns:
cmpNumbers
-
a -
b
Compare numbers for sorting
Parameters:
-
aNumber -
bNumber
Returns:
copyArray
-
a
Copy an array (copy every object in the array)
Parameters:
-
aArray
Returns:
copyObject
-
o
Copy an object
Parameters:
-
oObject
Returns:
drawAnnotation
-
AnnotationSymbol
Draws annotation textbox. Calculates textbox position and text breaks.
Parameters:
-
AnnotationSymbolPathincludes Position and AnnotationData
drawEverything
()
As the name says. Must be called every time the layout changes
fillBlock
-
relId -
block
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:
-
relIdNumber -
blockBlock
fullRelationCurveTo
-
path -
endPoint -
curveHeight
Draws a "full relation curve", meaning two curves that are connected by a straight line
Parameters:
-
pathpaper.Path -
endPointpaper.Point -
curveHeightNumber
getX
-
date
Parameters:
-
dateDate
Returns:
x-position on screen for date
otherPersonId
-
p -
rel
Parameters:
-
pPerson -
relRelationship
Returns:
id of other person in the relationship
personColor
-
person
Parameters:
-
personPerson
Returns:
color of person's line, determined by doi and sex
relationCurveTo
-
path -
endPoint
Draws a curve for the current path to endPoint (used in fullRelationCurveTo)
Parameters:
-
pathpaper.Path -
endPointpaper.Point
resetDois
-
value
Set doi values of all persons to value
Parameters:
-
valueNumber
selectMatchingLine
()
Conducts person search, and sets this person in focus.
setDois
-
p -
currentDoi
This recursive function calculates the DOI values for every person, starting at the person in focus.
Parameters:
-
pPersonPerson in focus
-
currentDoiNumbermaximal DOI value
setFocusLine
-
line
Sets the clicked LifeLine in focus, starts the line animation, and starts calculation of Dois.
Parameters:
-
linePathThe lifeline which is new Focus point.
sign
-
x
Sign function
Parameters:
-
xNumber
Returns:
sortBlockPersons
()
Sort the persons of a block by birth date
Events
db_data
Called when database data is received
Event Payload:
-
dataObjectcontains the database content from the server
keypress
Starts person search on key "enter".
onFrame Animation
If animation Event takes place, animate LifeLine
onMouseDown
Starts different interactions, depending on which object was clicked.
onresize
If window changes size resize and redraw TimeNets
show_invisible_check
Displays invisible lines
timenet_list
Called when information about available timenets is received from the server
Event Payload:
-
dataObjectcontains the list of timenet ids
