adobe-webplatform / snap.svg Goto Github PK
View Code? Open in Web Editor NEWThe JavaScript library for modern SVG graphics.
Home Page: http://snapsvg.io
License: Apache License 2.0
The JavaScript library for modern SVG graphics.
Home Page: http://snapsvg.io
License: Apache License 2.0
According to the API docs Element.removeData should remove all the data from the element, but in this test it leaves part of the data.
API docs refer to Savage.pathBBox, this should probably be changed to Savage.path.getBBox or added as an alias.
Once all issues have been addressed, create a v0.1.0 tag and get Yohie the link to the zip file.
People won't always know to "twist" (drag) the knob. Please make the labels clickable, as well.
And add to your .gitignore file.
The docs claim the returned output is an object with a certain format, instead it returns a BBox object that does not match that format. I assume the docs here are incorrect, rather than the behavior.
Not sure if this is a problem with the way I'm testing the method, but I would expect it to work.
The docs mention a Savage.findDotsAtSegment but this should probably be Savage.path.findDotsAtSegment
According to the API docs under Savage.getRGB(colour) it should be possible to parse colors with percentages set, like rgb(•••%, •••%, •••%) for rgb, hsl and hsb. However, all tests with strings like this appear to fail.
The docs for Snap skip over the constructor options.
Change the project description to:
A JavaScript library for modern SVG graphics.
The map is positioned differently and moves off the bottom of the screen. (Low priority.)
Unlike the docs claim, the "string" property in the object returned by Element.transform() is an array of strings, rather than a string.
See here:
https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L552
Looks like it's expected to be String.prototype.toLowerCase
Looks like the code should be:
return animations[id] || null;
instead of:
return animations[anim.id] || null;
Test throws error: ReferenceError: unit2px is not defined
Looking the API docs and existing tests, the following methods still need testing and will be tracked here:
Savage
Savage.filter
Savage.path
Matrix
Set
Mina
Uncaught TypeError: Property '-72' of object # is not a function
Very high priority.
The snap-mascot demo isn't working. Mousing over the mascot throws this error:
Uncaught TypeError: string is not a function: snap.svg-min.js 18
The API docs say Element.clone creates and returns a element, but the implementation uses cloneNode to copy the element, without a element being created.
following code does not animate line as it should:
var s = new Snap('100%', '100%');
myPath = s.path('M0,0c0,0,0-28.008,0-46.707S0-89,0-89');
myPath.attr({
'fill': 'none',
'stroke': 'red',
'stroke-width': 25,
'stroke-miterlimit': 10,
'stroke-linecap': 'round',
'opacity': 1,
'stroke-dasharray': "120 200",
'stroke-dashoffset': 0
});
myPath.transform('translate(100, 300)');
myPath.animate({'stroke-dashoffset': 120});
Probably the same issue as in issue #5
Tests:
https://github.com/adobe-webplatform/savage/blob/master/test/savage-tests.js#L89
https://github.com/adobe-webplatform/savage/blob/master/test/savage-tests.js#L156
works fine on chrome though
Test returns 'eldata is not defined' error when attempting to set data.
I know, this one's kind of nitpicky, but since the docs say it returns a boolean, it's technically failing. :)
npm / component / bower or something so that the little chunks are useful to people (and to keep yourself sane), then produce a snap build from those. Otherwise looks good! :D
Add a link to the Snap.svg site in the README. The link is (or will be) snapsvg.io.
The README should mention that you might need to use sudo with npm, depending on your configuration.
Should be easily fixed by replacing this.node.parentNode with this.node
Write a getting started guide for the site, and link to it from the README. It should include:
Write it up, and send it to Yohei for inclusion on the site.
IE10, Getting Started - clicking forward button often gets stuck at step 2 and 3. Works fine with Chrome
Came across a case where Element.animate() is not triggered from within another Element.animate()'s callback. I was able to resolve the issue by wrapping the second animate function in a setTimeout of 50ms. Appears to be a timing issue.
road_bottom.animate({x2:691.5}, 2000, function(){
tunnel_mask_bottom_right.animate({
y: 394,
height:150
}, 200);
});
This is also causing my innerSVG test to fail, after finding that I split it up into a new test.
Investigate why the test is not passing while the same code on the page is working perfectly.
The broken test code:
it("Element.asPX - from em", function() {
var rect = s.rect(0, 0, 10, '10em');
var heightAsPx = rect.asPX("height");
expect(heightAsPx).to.be(160); // assumes 1em = 16px, is this safe?
});
It returns {from: 0, to: 0}, which doesn’t make sense.
Create a "demos" directory for the samples. Create directories for each demo so the HTML and SVG assets are together. Name the demo directories something descriptive (i.e. "map", "barista", etc.).
Currently it appears as:
Matrix.add(a, b, c, d, e, f, matrix)
which based on the code should be split to accepting either a-f params or just the matrix.
This test used to pass, so appears to have broken with a fairly recent change.
We decided to get rid of the code callouts on the coffee maker demo, so please remove them.
Seems like the callback never gets called. Works fine with only easing/callback or neither, but problem occurs when supplying both.
Let's debug. If it's a bug in Snap, please assign to Dmitry.
Let's make the docs browsable (a GitHub page?) and put a link in the README.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.