Skip to content

Commit

Permalink
Implementing row animation after jump. Addresses #780
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Nov 15, 2017
1 parent 94f5809 commit 249de39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions web-server/plugins/slycat-parameter-image/css/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -972,4 +972,8 @@ a {
#playback-controls .pause-button
{
width: 22px;
}
.slick-cell.flashing {
border-width: 0px !important;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,20 @@ $.widget("parameter_image.table",
}
else if(key == "jump_to_simulation")
{
self.grid.scrollRowToTop(value);
self.data.get_indices("sorted", [value], function(sorted_rows)
{
if(sorted_rows.length)
{
var rowIndex = Math.min.apply(Math, sorted_rows);
self.grid.scrollRowToTop(rowIndex);
// Get all the columns
self.grid.getColumns().forEach(function(col){
// Flash each cell
self.grid.flashCell(rowIndex, self.grid.getColumnIndex(col.id));
})
}

});
}
},

Expand Down

0 comments on commit 249de39

Please sign in to comment.