Class Index | File Index

Classes


Class GenomeView


Defined in: GenomeView.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
GenomeView(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.
 
 
addTrack(track)
 
 
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)
 
 
 
 
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)
 
 
 
 
showVisibleBlocks(updateHeight, pos, startX, endX)
 
 
 
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(elem, stripeWidth, refseq, zoomLevel, browserRoot)
Main view class, shows a scrollable, horizontal view of annotation tracks. NOTE: All coordinates are interbase.
Parameters:
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

addTrack(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()

getPosition()

getWidth()

getX()

getY()

hideRubberHighlight(start, end)
Parameters:
start
end

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

rawSetPosition(pos)
Parameters:
pos

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(pos)
Parameters:
pos

setRubberHighlight(start, end)
Parameters:
start
end

setX(x)
Parameters:
x

setY(y)
Parameters:
y

showCoarse()

showDone()

showFine()

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

showWait()

sizeInit()

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

updateTrackList()

updateViewDimensions()
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.

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 Apr 19 2012 17:55:41 GMT-0400 (EDT)