Difference between revisions of "Extending Embedding and Customizing JBrowse"

From GMOD
Jump to: navigation, search
Line 12: Line 12:
  
 
* Hooks:
 
* Hooks:
 
+
** featureCreate: has access to: feature data, feature HTML element, can:
  * featureCreate: has access to: feature data, feature HTML element, can:
+
*** style the element, and
      * style the element, and
+
*** add callbacks to the element
      * add callbacks to the element
+
** featureEventHooks:
  * featureEventHooks:
+
{ click: function(feature array, HTML element, getAttr, event)
{{{
+
{ click: function(feature array, HTML element, getAttr, event)
+
 
   mouseover: function(...
 
   mouseover: function(...
 
   mouseout: ...
 
   mouseout: ...
 
   [DOM event name]: [callback function]
 
   [DOM event name]: [callback function]
}
+
}
 +
 
 +
current approach:
  
current approach:
+
fields:
 +
{ "start": 1,
 +
  "end": 2,
 +
  "strand": 3,
 +
  ...
 +
}
  
fields:
+
changing to: getAttr
{ "start": 1,
+
  "end": 2,
+
  "strand": 3,
+
  ...
+
}
+
  
changing to: getAttr
+
ends block
}}}
+

Revision as of 19:50, 7 March 2011

Result of discussions at GMOD satellite meeting, March 2011

Potential upcoming changes to JSON format:

http://biowiki.org/view/JBrowse/JsonFormatStabilization

TODO/wishlist for JBrowse:

  • namespace CSS
  • putting track list into separate DOM element (e.g., Drupal "block")
  • Browser API: anything you can do manually
  • Hooks:
    • featureCreate: has access to: feature data, feature HTML element, can:
      • style the element, and
      • add callbacks to the element
    • featureEventHooks:
{ click: function(feature array, HTML element, getAttr, event)
 mouseover: function(...
 mouseout: ...
 [DOM event name]: [callback function]
}
current approach:
fields:
{ "start": 1,
  "end": 2,
  "strand": 3,
  ...
}
changing to: getAttr

ends block