Class DiaryBlock
A block of diary items.
Holds diary items that overlap in time within a single day. You won't want
to deal with these directly.
Properties
Time, in seconds, of the end of this block.
Default Value: -1
_items
- protected Array
Array of DiaryItem in this block.
Default Value: []
_lines
- protected Array
The number of vertical lines in the block.
Array holding an objects for each line, of the form
{ startSecs: 123, endSecs: 456 , visible: true }
Default Value: []
Time of day, in seconds of the start of this block.
Default Value: 86401
Methods
protected
Int} || {False
_findLineForItem
(
)
Will the item fit in an existing vertical line?
- Returns:
Int} || {False
- - line number
void
addItem
(
item
)
Adds a DiaryItem to the block.
- Parameters:
-
item
<DiaryItem>
- Returns:
void
Boolean
contains
(
item
)
Does item overlap with this block?
- Parameters:
-
item
<DiaryItem>
- Returns:
Boolean
void
getOffset
(
)
Gives the number of visible lines across the line passed is
protected
void
init
(
)
Initializer function.
Boolean
removeItem
(
DiaryItem
)
Removes an item from the block
- Parameters:
-
DiaryItem
<DiaryItem>
to remove
- Returns:
Boolean
- True if removed, false if not found
Boolean
render
(
Object
)
Renders the DiaryItems in the block
- Parameters:
-
Object
<object>
Literal containing width property of entire column
- Returns:
Boolean