Commit 3d7f9a03 authored by Gergely Ujvari's avatar Gergely Ujvari Committed by Aron Carroll

Remove bad css classes from buckets

Once a bucket received a lower or an upper css class, it was never removed.

Once an update function is done, than the bucket with an index of last one - 2
will automatically receive a lower css class because that is the definition
of the isLower function.

The heatmap plugin reuses the already existing buckets and only adds new
ones if neeeded. So after new buckets are added a new one with will get
the lower css class, but nobody removes the lower class from the bucket
which already had it.
parent 6be1be70
...@@ -370,6 +370,8 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin ...@@ -370,6 +370,8 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
.addClass (d) => if @isUpper(d) then 'upper' else '' .addClass (d) => if @isUpper(d) then 'upper' else ''
.addClass (d) => if @isLower(d) then 'lower' else '' .addClass (d) => if @isLower(d) then 'lower' else ''
.removeClass (d) => unless @isUpper(d) then 'upper' else ''
.removeClass (d) => unless @isLower(d) then 'lower' else ''
.css 'display', (d) => .css 'display', (d) =>
bucket = @buckets[d] bucket = @buckets[d]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment