Class Index | File Index

Classes


Class GenomeView


Defined in: GenomeView.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
GenomeView(browser, elem, stripeWidth, refseq, zoomLevel, browserRoot)
Main view class, shows a scrollable, horizontal view of annotation tracks.
Method Summary
Method Attributes Method Name and Description
 
absXtoBp(pixels)
Convert absolute pixels X position to base pair position on the current reference sequence.
 
 
 
bpToPx(bp)
 
calculatePositionLabelHeight(containerElement)
Conduct a DOM test to calculate the height of div.pos-label elements with a line of text in them.
 
Conducts a test with DOM elements to measure sequence text width and height.
 
centerAtBase(base, instantly)
 
checkDragOut(event)
stop the drag if we mouse out of the view
 
checkY(y)
 
clampX(x)
 
clampY(y)
 
 
dragEnd(event)
 
dragMove(event)
 
 
 
 
getX()
 
getY()
 
hideRubberHighlight(start, end)
 
hideTracks(trackConfigs)
Remove the given track (configs) from the genome view.
 
 
 
 
onCoarseMove(startbp, endbp)
Hook for other components to dojo.connect to.
 
onFineMove(startbp, endbp)
Hook for other components to dojo.connect to.
 
Hook to be called on a window resize.
 
Convert absolute X pixel position to base pair position on the overview track.
 
Event handler fired when the overview bar is single-clicked.
 
 
pxToBp(pixels)
 
 
 
rubberCancel(event)
 
 
rubberMove(event)
 
Event handler fired when the track scale bar is single-clicked.
 
 
setLocation(refseq, startbp, endbp)
 
 
setRubberHighlight(start, end)
 
setX(x)
 
setY(y)
 
 
 
 
showTracks(trackConfigs)
Add the given track configurations to the genome view.
 
showVisibleBlocks(updateHeight, pos, startX, endX)
 
 
Update the view's state, and that of its tracks, for the current width and height of its container.
 
slide(distance)
 
Event fired when a user's mouse button goes down inside the main element of the genomeview.
 
startRubberZoom(absToBp, container, event)
Start a rubber-band dynamic zoom.
 
stripeWidthForZoom(zoomLevel)
 
thumbMoved(mover)
Event handler fired when the region thumbnail in the overview bar is dragged.
 
trackHeightUpdate(trackName, height)
 
trackIterate(callback)
 
 
updateOverviewHeight(trackName, height)
 
Given a new X and Y pixels position for the main track container, reposition static elements that "float" over it, like track labels, Y axis labels, the main track ruler, and so on.
 
 
 
 
 
zoomIn(e, zoomLoc, steps)
 
zoomOut(e, zoomLoc, steps)
 
zoomUpdate(zoomLoc, fixedBp)
Class Detail
GenomeView(browser, elem, stripeWidth, refseq, zoomLevel, browserRoot)
Main view class, shows a scrollable, horizontal view of annotation tracks. NOTE: All coordinates are interbase.
Parameters:
browser
elem
stripeWidth
refseq
zoomLevel
browserRoot
Method Detail
{Number} absXtoBp(pixels)
Convert absolute pixels X position to base pair position on the current reference sequence.
Parameters:
{Number} pixels
Returns:
{Number}

addOverviewTrack(track)
Parameters:
track

afterSlide()

bpToPx(bp)
Parameters:
bp

calculatePositionLabelHeight(containerElement)
Conduct a DOM test to calculate the height of div.pos-label elements with a line of text in them.
Parameters:
containerElement

calculateSequenceCharacterSize(containerElement)
Conducts a test with DOM elements to measure sequence text width and height.
Parameters:
containerElement

centerAtBase(base, instantly)
Parameters:
base
instantly

checkDragOut(event)
stop the drag if we mouse out of the view
Parameters:
event

checkY(y)
Parameters:
y

clampX(x)
Parameters:
x

clampY(y)
Parameters:
y

doubleClickZoom(event)
Parameters:
event

dragEnd(event)
Parameters:
event

dragMove(event)
Parameters:
event

getHeight()

{Object} getPosition()
Returns:
{Object} as { x: 123, y: 456 }

getWidth()

getX()

getY()

hideRubberHighlight(start, end)
Parameters:
start
end

hideTracks(trackConfigs)
Remove the given track (configs) from the genome view.
Parameters:
{Array[String]} trackConfigs
{Array[Object]} array of track configurations

instantZoomUpdate()

{Number} maxVisible()
Returns:
{Number} maximum basepair coordinate of the current reference sequence visible in the genome view

{Number} minVisible()
Returns:
{Number} minimum basepair coordinate of the current reference sequence visible in the genome view

onCoarseMove(startbp, endbp)
Hook for other components to dojo.connect to.
Parameters:
startbp
endbp

onFineMove(startbp, endbp)
Hook for other components to dojo.connect to.
Parameters:
startbp
endbp

onResize()
Hook to be called on a window resize.

overview_absXtoBp(x)
Convert absolute X pixel position to base pair position on the overview track. This needs refactoring; a scale bar should itself know how to convert an absolute X position to base pairs.
Parameters:
{Number} x
absolute pixel X position (for example, from a click event's clientX property)

overviewClicked(evt)
Event handler fired when the overview bar is single-clicked.
Parameters:
evt

overviewTrackIterate(callback)
Parameters:
callback

pxToBp(pixels)
Parameters:
pixels

rawSetX(x)
Parameters:
x

rawSetY(y)
Parameters:
y

rubberCancel(event)
Parameters:
event

rubberExecute(event)
Parameters:
event

rubberMove(event)
Parameters:
event

scaleClicked(evt)
Event handler fired when the track scale bar is single-clicked.
Parameters:
evt

scrollUpdate()

setLocation(refseq, startbp, endbp)
Parameters:
refseq
startbp
endbp

setPosition()
Parameters:
pos.x
new x position
pos.y
new y position

setRubberHighlight(start, end)
Parameters:
start
end

setX(x)
Parameters:
x
Returns:
the new x value that was set

setY(y)
Parameters:
y
Returns:
the new y value that was set

showCoarse()

showDone()

showFine()

showTracks(trackConfigs)
Add the given track configurations to the genome view.
Parameters:
trackConfigs
{Array[Object]} array of track configuration objects to add

showVisibleBlocks(updateHeight, pos, startX, endX)
Parameters:
updateHeight
pos
startX
endX

showWait()

sizeInit()
Update the view's state, and that of its tracks, for the current width and height of its container.
Returns:
nothing

slide(distance)
Parameters:
distance

startMouseDragScroll(event)
Event fired when a user's mouse button goes down inside the main element of the genomeview.
Parameters:
event

startRubberZoom(absToBp, container, event)
Start a rubber-band dynamic zoom.
Parameters:
{Function} absToBp
function to convert page X coordinates to base pair positions on the reference sequence. Called in the context of the GenomeView object.
{HTMLElement} container
element in which to draw the rubberbanding highlight
{Event} event
the mouse event that's starting the zoom

stripeWidthForZoom(zoomLevel)
Parameters:
zoomLevel

thumbMoved(mover)
Event handler fired when the region thumbnail in the overview bar is dragged.
Parameters:
mover

trackHeightUpdate(trackName, height)
Parameters:
trackName
height

trackIterate(callback)
Parameters:
callback

trimVertical(y)
Parameters:
y

updateOverviewHeight(trackName, height)
Parameters:
trackName
height

updateStaticElements()
Given a new X and Y pixels position for the main track container, reposition static elements that "float" over it, like track labels, Y axis labels, the main track ruler, and so on.
Parameters:
args.x Optional
the new X coordinate. if not provided, elements that only need updates on the X position are not updated.
args.y Optional
the new Y coordinate. if not provided, elements that only need updates on the Y position are not updated.
args.width Optional
the new width of the view. if not provided, elements that only need updates on the width are not updated.
args.height Optional
the new height of the view. if not provided, elements that only need updates on the height are not updated.

updateTrackList()

{Array[Track]} visibleTracks()
Returns:
{Array[Track]} of the tracks that are currently visible in this genomeview

wheelScroll(e)
Parameters:
e

zoomCallback()

zoomIn(e, zoomLoc, steps)
Parameters:
e
zoomLoc
steps

zoomOut(e, zoomLoc, steps)
Parameters:
e
zoomLoc
steps

zoomUpdate(zoomLoc, fixedBp)
Parameters:
zoomLoc
fixedBp

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 14 2012 17:43:45 GMT-0400 (EDT)