Skip to content

Commit

Permalink
added trait for configuring how much non-selected lines get dimmed
Browse files Browse the repository at this point in the history
  • Loading branch information
bhendrix committed Apr 15, 2010
1 parent 6bb97ac commit a7a3daa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions enthought/chaco/tools/legend_highlighter.py
Expand Up @@ -2,7 +2,7 @@

# ETS imports
from enthought.chaco.tools.api import LegendTool
from enthought.traits.api import List
from enthought.traits.api import List, Float


def get_hit_plots(legend, event):
Expand Down Expand Up @@ -35,6 +35,8 @@ class LegendHighlighter(LegendTool):
"""

drag_button = "right"

dim_factor = Float(3.0)

# The currently selected renderers
_selected_renderers = List
Expand Down Expand Up @@ -94,8 +96,7 @@ def _set_states(self, plots):
plot.line_width = plot._orig_line_width * 2.0
plot.alpha = plot._orig_alpha
else:
plot.alpha = min(plot._orig_alpha * 3.0, 1.0)
plot.alpha = plot._orig_alpha / 3.0
plot.alpha = plot._orig_alpha / self.dim_factor
plot.line_width = plot._orig_line_width / 2.0
# Move the selected renderers to the front
if len(self._selected_renderers) > 0:
Expand Down

0 comments on commit a7a3daa

Please sign in to comment.