Skip to content

Commit

Permalink
fix check when syncing
Browse files Browse the repository at this point in the history
fix zoom-in threshold exceeded, but not fetch individual until next resolution
stop flickering when zooming out
this time hopefully fixed for good
  • Loading branch information
Lubomir Dolezal committed Sep 9, 2022
1 parent 3456b58 commit a977146
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/datasets/bucket-dataset.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,18 @@ class BucketDataset extends RecordDataset
@listeners.synced()
summaryCallback()
)
else if not @bucketCache.isCountLower(start, end, 1)[0] and not @useBuckets(start, end)
@drawBucketState = false
RecordDataset.prototype.doFetch.call(this, start, end, params)

draw: (start, end, options) ->
toDrawBucket = true
if @drawBucketState != null
if @isSyncing()
[ isLower, definite ] = @bucketCache.isCountLower(start, end, @histogramThreshold)
if not definite
toDrawBucket = @drawBucketState
else
toDrawBucket = not @bucketCache.isCountLower(start, end, @histogramThreshold)[0]
toDrawBucket = not isLower
if toDrawBucket == true
{ scales } = options
[ tickObjects, resolution ] = @makeTicks(scales.x)
Expand Down

0 comments on commit a977146

Please sign in to comment.