Skip to content

Commit

Permalink
changed zoom threshold for caching DNA as PNG image from 1 to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Sep 6, 2022
1 parent c21c592 commit d4c7ca5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ const int DNA_SEQUENCE_VERTICAL_OFFSET = 50;
const int DNA_SEQUENCE_HORIZONTAL_OFFSET = 50;

// Zoom threshold used for caching the svg as png.
const num ZOOM_THRESHOLD = 1;
const num ZOOM_THRESHOLD = 0.5;

/////////////////////////////////////////////////////////////
// Backend
Expand Down
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
// svg-png-caching

function on_zoom(newZoom) {
if (newZoom < 1 && svg_cache_callback) {
if (newZoom < zoom_threshold && svg_cache_callback) {
svg_cache_callback();
}
}
Expand Down

0 comments on commit d4c7ca5

Please sign in to comment.