Giter Site home page Giter Site logo

raphael-plugin-group's Introduction

Group plugin for RaphaelJS

A RaphaelJS plugin, which adds support for the SVG <g> tag.

Donate Build Status semantic-release Commitizen friendly JavaScript Style Guide

Original notes by: Matthew Taylor

This is an updated version of the Raphael.group.js plugin. It adds support for moving groups and scaling the X and Y axis independently.

WARNING: These plugins were not tested in IE, and I don't care.

These are plugins I've created for the RaphaelJS library (http://raphaeljs.com/ => https://github.com/DmitryBaranovskiy/raphael) for my own personal use. Feel free to use them as well.

Update

If you don't need to worry about IE8 (or below) users, then I suggest you to migrate over to the newer SnapSVG library, which is more lightweight, produced by the same author, has a similar syntax and has all the features of SVG covered, that was missing from RaphaelJS, including groups.

RaphaelJS tries to even out the differences between SVG and the old, outdated Microsoft Vector Markup Language (VML). It only supports features, which are present in both SVG and VML, and grouping is only supported in SVG.

Links

Requirements

Though raphael.group.js may work in a browser as old as IE8, it uses some Javascript features, which might not be supported by that browser. For this purpose a separate polyfills.js can be included among the plugins as a patch.

raphael-plugin-group's People

Contributors

daandd avatar githubstig avatar meszaros-lajos-gyorgy avatar rhyolight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

raphael-plugin-group's Issues

Cannot read property 'match' of null

Hi, wow, thank you!
Just noticed when dragging a group trough draggable(), the first time it logs an error:

Cannot read property 'match' of null

Multiple transformation in SVG group elements are applied from right to left

According to https://www.dashingd3js.com/svg-group-element-and-d3js

The SVG Transform Attribute applies a list of transformations to an element and it's children.
Each transform definition is separated by white space and or commas.

Example given:

<g transform="translate(...) scale(...) rotate(...) translate(...) rotate(...)">

The transformations are applied from right to left.
They are applied right to left because they are treated as nested transforms.

I know it's not an issue and to keep things simple it's not handled. But just leaving it here since I found it quite interesting.

I cannot drag a group

I saw that there is a draggable function but I could not drag a group. Can you please add an example?
I tried this:

group.drag(movf,startf,endf)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.