How to use the snapsvg/dist/snap.svg-min function in snapsvg

To help you get started, we’ve selected a few snapsvg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github slissner / HoroscopeDrawer / src / horoscope / drawer.js View on Github external
this.selector = properties.selector;
    } else {
      throw new Error('Irregular selector');
    }

    this.PLANET_IMAGE_WIDTH = 4;
    this.PLANET_IMAGE_HEIGHT = 4;
    this.PLANET_RADIUS_OFFSET = 3;
    this.PLANET_COLLISION_MARGIN_IN_DEGREE = 4;
    this.PLANET_COLLISION_CORRECTION_RADIUS = 4;
    this.MAX_PLANET_COLLISION_CORRECTION = 4;

    this.planets = (properties.hasOwnProperty('planets')) ? properties.planets : null;
    this.houses = (properties.hasOwnProperty('houses')) ? properties.houses : null;

    this.snap = Snap(this.selector);
    this.snap.attr({viewBox: "-50 -50 100 100"});

    this.drawn = {
      circles: this.drawZodiacCircles(),
      degrees: this.drawZodiacDegrees(),
      zodiac: {
        signs: this.drawZodiacSigns(properties.zodiac.ascendant.sign, properties.zodiac.ascendant.degree),
        ascendant: {
          signIndex: properties.zodiac.ascendant.sign,
          correctedByDegrees: properties.zodiac.ascendant.degree,
        }
      },
      houses: {
        axes: this.drawHousesAxes(),
        meta: this.houses
      },

snapsvg

JavaScript Vector Library

Apache-2.0
Latest version published 7 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages