Skip to content

Improve renderSpeciesPhenophases() handling of radius #19

@dhornbein

Description

@dhornbein

The initial phenophases can appear too close to the center of the pClock. Currently the phenophase's index is multiplied by the initial radius.

js/pclock.renderer.js:96

for( var phenophase in phenophases ) {
      var start = phenophases[phenophase].start,
        end = phenophases[phenophase].end;
      if( start && end ){
        var phenophaseElement = this.paper.path().attr({
          "stroke": "#" + sp.color,
          "stroke-linecap": "round",
          "stroke-width": Math.max( this.options.strokeWidth * ( zoom * 0.075 * speciesIndex ), 3 )
        }).attr({
          arc: [ center.x, center.y, r * speciesIndex, start, end ]
        });
        phenophaseElement.node.setAttribute("class", slug );
        sp.registerPhenophaseElement( phenophaseElement );
      }
    }

There needs to be some way to set the radius "dead zone" in the middle and raise the increment between each phenophase by the stroke width rather than initial radius.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions