     @html @template
     @paper = Raphael @points[0], '100%', '100%'
 
-  setSpecies: (@species) =>
-    return unless @species
+  setSpecies: (species) =>
+    return unless species
+    return if species is @species
+    @species = species
 
     @image.attr 'src', @helpers[@species].image
     @image.one 'load', =>

Spine = require 'Spine'
Raphael = require 'Raphael'

template = require 'lib/text!views/MarkerIndicator.html'


      circle.attr cx: coords.x, cy: coords.y, fill: style[@species]
      @circles.push circle

    @step = -1
    @setStep 0

  setStep: (step) =>
    step %= @helpers[@species].points.length
    return if step is @step
    @step = step

    @circles.attr style.helperCircle

    # Flicker the active dot.
    @circles[@step].animate style.helperCircle.active, 100, =>
      @circles[@step].animate style.helperCircle, 100, =>
        @circles[@step].animate style.helperCircle.active, 100

exports = MarkerIndicator
