briandk / gitvisualizations

A suite of visualization tools for analyzing files in git
http://briandk.com/codetimeline_demos/simulator/simulator.html
3 stars 3 forks source link

Adding x-ray mode #25

Open briandk opened 11 years ago

briandk commented 11 years ago

@alloy-d suggests:

You'd add an "x-ray" class to an ancestor of the commits via JS, then use !important to override font colors within that element.

So,

  1. define a separate xray.css stylesheet
  2. in xray.css, create a selector for, say, .xray that defines a look for font-color
  3. Also define a separate selector for elements that are a line-highlight class
briandk commented 11 years ago

Adding and removing classes to elements can be accomplished with jquery

$("p").addClass("myClass yourClass"); // adds myClass and yourClass to all <p> elements
$('p').removeClass('myClass yourClass') // removes myClass and yourClass from all <p> elements
briandk commented 11 years ago

Also: we need to modify the Python logic to write out line-highlight strings. This should probably be handled in the view class.

briandk commented 11 years ago

We may want to change how we do this. As @alloy-d and I discussed, what we might think about is: