How to use the snapsvg.plugin 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 microsoft / PowerBI-visuals-ClusterMap / lib / @uncharted / personas / src / personas.core.node.js View on Github external
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/* enable strict mode */
'use strict';

/* import modules */
var Snap = require('snapsvg');
var Point2D = require('./personas.core.point2d');
var Observable = require('./personas.core.observable.js');

/* get the Snap private primitives */
var __snapPrimitives = {};
Snap.plugin(function (SnapLib, Element, Paper, global, Fragment) {
    __snapPrimitives.snap = SnapLib;
    __snapPrimitives.element = Element;
    __snapPrimitives.paper = Paper;
    __snapPrimitives.global = global;
    __snapPrimitives.Fragment = Fragment;
});


/**
 * Base class for all persona and SVG elements.
 *
 * @class Node
 * @param {String} [type='g'] - The type of element to be created, defaults to `g` (group).
 * @param {Object=} attr - Attributes to be added when creating the object.
 * @constructor
 */

snapsvg

JavaScript Vector Library

Apache-2.0
Latest version published 8 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages