Skip to content

Commit

Permalink
resolves #188 by turning off annotation display when it would require…
Browse files Browse the repository at this point in the history
… more than 12 chunks
  • Loading branch information
marshallds committed Jul 23, 2013
1 parent 3b984f8 commit 24149a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SkittleCore/UI/assets/js/draw_canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ var drawRasterGraph = function(graph,offset,chunks) {
var newImageData = b.createImageData(state.width(),toSkixels(1000)) //create new image data with desired dimentions (width)
var newData = newImageData.data;

var fadePercent = (annotationSelectedStart > 0) ? 0.45 : 1;
var fadePercent = (annotationSelectedStart > 0) ? 0.5 : 1;

var chunkStartOffset = round(state.startTopOfScreen(1), state.chunkSizeBP(), "down");
var startOffset = Math.round( (state.startTopOfScreen() - chunkStartOffset - 1)/state.scale() )*4;
Expand Down Expand Up @@ -231,6 +231,11 @@ var drawAnnotation = function(file,statusIndex,offset) {

var chunks = skixelsOnScreen*state.scale()/state.chunkSize + 1;

if (chunks > 12) {
hideGraph(file);
return 0;
}

for (var i = 0; i < chunks; i++) {
annotationRequestor((Math.floor(state.start()/65536)+i)*65536+1)
};
Expand Down

0 comments on commit 24149a5

Please sign in to comment.