Class Papercube.PaperTreeView

Extends: NodeGraph.DragPanMixin, SC.View
Defined in: clients/papercube/views/papertree.js
Version: 1.0
Author: Peter Bergstrom
Copyright: 2008-2009 Peter Bergström.

Overview

This is a tree map-like view of papers.

Property Summary

Method Summary

Property Details

_cached_citeThreshold [R/W]

Cite threshold cached value.

-   Integer _cached_citeThreshold

Default Value: 1


_cached_depth [R/W]

Depth cached value.

-   Integer _cached_depth

Default Value: 15


_cached_refThreshold [R/W]

Ref threshold cached value.

-   Integer _cached_refThreshold

Default Value: 1


_canvasHeight [R/W]

Cached height of the view's canvas, set by the displayProperties.

-   Integer _canvasHeight

Discussion

Default 600px.


_canvasWidth [R/W]

Cached width of the view's canvas, set by the displayProperties.

-   Integer _canvasWidth

Default Value: 800px


_displayRefs [R/W]

Display references or citations.

-   Boolean _displayRefs

Default Value: YES


_foundGuid [R/W]

The found GUID.

-   String _foundGuid


_h [R/W]

Cached height property from displayProperties.

-   Integer _h


_metaDataBoxHeightSmall [R/W]

Meta data box small height.

-   Integer _metaDataBoxHeightSmall

Default Value: 120


_metaDataBoxWidthSmall [R/W]

Meta data box small width.

-   Integer _metaDataBoxWidthSmall

Default Value: 400


_node [R/W]

The node element that is cloned over and over during the construction of the tree.

-   DOM Element _node


_rowHeight [R/W]

The height of a row in the visualization.

-   Integer _rowHeight

Default Value: 1px


_styleSheet [R/W]

Cached stylesheet reference.

-   DOM Element _styleSheet


_textNode [R/W]

The text node element that is cloned over and over during the construction of the tree.

-   DOM Element _textNode


_w [R/W]

Cached width property from displayProperties.

-   Integer _w


_x [R/W]

Cached x-axis offset property from displayProperties.

-   Integer _x


_y [R/W]

Cached y-axis offset property from displayProperties.

-   Integer _y


canvas [R/W]

The canvas element, not Canvas Tag, just DIVs.

-   Object canvas


citeThresholdBinding [R/W]

Bind the cite threshold binding.

-   Integer citeThresholdBinding

Bound To: "Papercube.paperTreeController.citeThreshold"

Discussion

Don't show papers with less cites.


depthBinding [R/W]

Bind the depth.

-   Integer depthBinding

Bound To: "Papercube.paperTreeController.depth"

Discussion

Don't show items beyond this depth.


displayPropertiesBinding [R/W]

Bind the display properties from the canvasController.

-   Array displayPropertiesBinding

Bound To: "Papercube.canvasController.displayProperties"


metaDataView [R/W]

The DOM element that contains the meta data for an item.

-   Object metaDataView

Discussion

Bound to the '.meta-data?' element.


outlets [R/W]

Outlets for author stat view.

-   Object outlets


refThresholdBinding [R/W]

Bind the ref threshold binding.

-   Integer refThresholdBinding

Bound To: "Papercube.paperTreeController.refThreshold",

Discussion

Don't show papers with less refs.


viewDirectionBinding [R/W]

Bind the view direction from the viewController.

-   String viewDirectionBinding

Bound To: "Papercube.viewController.viewDirection"


Method Detail

_buildLevel()

Recursively draw the tree.

-   (Array) _buildLevel (guid, level, parentWidth, masterLeft, idx)

Parameters

guid {string} The guid of the item.

level {Integer} The current level.

parentWidth {Integer} The width of the parent element.

masterLeft {Integer} The left position.

idx {Integer} The position of the relation.

Returns

(Array) {DOM Element} Returns the contstructed node to be appended to the parent.


_hideMetaData()

Hide meta data box.

-   (void) _hideMetaData ()


_render()

Collect what needs to be rendered.

-   (void) _render ()

Discussion

Then render the view.


_showMetaData()

Show meta data for paper!

-   (Boolean) _showMetaData (evt, guid)

Parameters

(DOM Element)evt The mouse event.

guid {string} The guid of the item.

Returns

(Boolean) Returns NO if there is no content.


displayPropertiesDidChange()

When the displayProperities binding changes, update the view appropriately.

-   (Boolean) displayPropertiesDidChange (force)

Parameters

force {boolean} If YES, force a redraw.

Returns

(Boolean) Returns NO if there is no guid of if the view is not visible.

Observes

displayProperties


init()

Initalization function.

-   (void) init ()

Discussion

Set up DOM nodes to be cloned for the tree.

Grab the stylesheet.

Set up the fan menu actions:

focusedFan: { CiteSeer: citeseerFunc, Save: saveFunc, "Zoom +": zoomInFunc, "Zoom -": zoomOutFunc }, unfocusedFan: { CiteSeer: citeseerFunc, Save: saveFunc, Refocus: refocusFunc, "Zoom +": zoomInFunc, "Zoom -": zoomOutFunc }


mouseDown()

Save the GUID of the element and then show the fan.

-   (void) mouseDown (evt)

Parameters

(DOM Event)evt The mouseDown event.


mouseExited()

When the mouse is moved out of the view, remove the class name that makes it visible.

-   (void) mouseExited (evt)

Parameters

(DOM Event)evt The mouseExited event.


redrawParamsDidChange()

Redraw based on 'content', 'isVisible', 'viewDirection', 'refThreshold', 'depth', 'citeThreshold' binding changes.

-   (Boolean) redrawParamsDidChange ()

Returns

(Boolean) Returns NO if there is no guid of if the view is not visible.

Observes

content

isVisible

viewDirection

refThreshold

depth

citeThreshold


removeHighlight()

Remove the highlight of redundant nodes.

-   (void) removeHighlight ()


Documentation generated by JsDoc Toolkit 2.0.2 on Sat Nov 21 2009 21:24:39 GMT-0800 (PST)