From 787509ce8db73b5666583af53580d55d1e413f3b Mon Sep 17 00:00:00 2001 From: Ryan Sandor Richards Date: Wed, 9 Jul 2014 15:20:19 -0700 Subject: [PATCH] Closes #114, #80; Removed isVisible. Removed the method from the base class and all references from the source. Since we are no longer using the hack due to problems with the approach, we can close the performance test ticket (#80). --- src/core/chart.coffee | 7 ------- src/time/area.coffee | 1 - src/time/bar.coffee | 1 - src/time/gauge.coffee | 2 -- src/time/heatmap.coffee | 1 - 5 files changed, 12 deletions(-) diff --git a/src/core/chart.coffee b/src/core/chart.coffee index 64edecd..e4d7d69 100644 --- a/src/core/chart.coffee +++ b/src/core/chart.coffee @@ -65,13 +65,6 @@ class Epoch.Chart.Base extends Epoch.Events @width = defaults.width unless @width? @height = defaults.height unless @height? - # Determines if the chart is currently visible in a document. - # @return [Boolean] True if the chart is visible, false otherwise. - isVisible: -> - return true - #return false unless @el? - #@el.is('*:visible') - # Set the initial data for the chart. # @param data Data to initially set for the given chart. The data format can vary # from chart to chart. The base class assumes that the data provided will be an diff --git a/src/time/area.coffee b/src/time/area.coffee index b23c925..981e260 100644 --- a/src/time/area.coffee +++ b/src/time/area.coffee @@ -69,7 +69,6 @@ class Epoch.Time.Area extends Epoch.Time.Stack # Draws the area chart. draw: (delta=0) -> - return unless @isVisible() @clear() @_drawAreas(delta) @_drawStrokes(delta) diff --git a/src/time/bar.coffee b/src/time/bar.coffee index df4ee05..4745ae8 100644 --- a/src/time/bar.coffee +++ b/src/time/bar.coffee @@ -22,7 +22,6 @@ class Epoch.Time.Bar extends Epoch.Time.Stack # Draws the stacked bar chart. draw: (delta=0) -> - return unless @isVisible() @clear() [y, w] = [@y(), @w()] diff --git a/src/time/gauge.coffee b/src/time/gauge.coffee index 05a2bfa..3275cfd 100644 --- a/src/time/gauge.coffee +++ b/src/time/gauge.coffee @@ -103,8 +103,6 @@ class Epoch.Time.Gauge extends Epoch.Chart.Canvas # Draws the gauge. draw: -> - return unless @isVisible() - [cx, cy, r] = [@centerX(), @centerY(), @radius()] [tickOffset, tickSize] = [@options.tickOffset, @options.tickSize] diff --git a/src/time/heatmap.coffee b/src/time/heatmap.coffee index 4366cc9..afff50c 100644 --- a/src/time/heatmap.coffee +++ b/src/time/heatmap.coffee @@ -205,7 +205,6 @@ class Epoch.Time.Heatmap extends Epoch.Time.Plot # Copies the paint canvas onto the display canvas, thus rendering the heatmap. draw: (delta=0) -> - return unless @isVisible() @clear() @ctx.drawImage @paint, delta, 0 super()