Skip to content

Settings and activity

1 result found

  1. 3 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jose Gustavo commented  · 

    The Solution:
    /**
    * An extendable collection of functions for defining symbol paths.
    */
    symbols: {
    'cross': function (x, y, radius) {
    var r = radius,
    e = r/4,
    a = e / Math.sqrt(2),
    b = Math.sqrt( ((r+a)*(r-a)/2) + ((a*a)/4) ) - (a/2);
    return [
    M, x - a, y,
    L, x - a - b, y - b,
    x - b, y - a - b,
    x , y - a,
    x + b, y - a - b,
    x + a + b, y - b,
    x + a, y,
    x + a + b, y + b,
    x + b, y + a + b,
    x, y + a,
    x - b, y + a + b,
    x - a - b, y + b,
    'Z'
    ];
    },

    An error occurred while saving the comment
    Jose Gustavo commented  · 
    Jose Gustavo shared this idea  ·