chrismichaelscott / fraphael Goto Github PK
View Code? Open in Web Editor NEWFilter Effects for Raphael.js
License: MIT License
Filter Effects for Raphael.js
License: MIT License
I have an application in which users manipulate symbols. Symbols are able to be rotated 0, 90, 180 and 270 degrees. I recently switched to using fraphael for the .shadow() feature. It's much nicer than having to deal with .glow() and all the headaches that come along with that. Works great with x,y transforms but it doesn't seem to work when rotating to 180 degrees.
It seems that filters (I've tried a few, same results) just don't want to work on 180. They work at 181 and 179, though.
Video Here: http://tinypic.com/r/2s7c0ll/8 (excuse the tinypic, only service I could get to work)
Hi,
When YUI compressor is used to minify the library this error is shown:
"error : missing name after . operator"
This is due to the usage of keyword in for attributes, for example in https://github.com/chrismichaelscott/fraphael/blob/master/fraphael.js#L101 . If you are still working on the project I can do a pull request with all the "in" changes for something like attributes['in'] .
The method FR.Filter.prototype.addEffect
iterates (for example when using emboss()
) over the elements of an array by using for (var x in children)
. If some framework or the application code has extended Array.prototype
(as prototype.js does), this piece may fail with an exception from the browser, for example "Argument 1 of Node.appendChild is not an object".
Solutions:
a) Add a property check right at the beginning of the for-loop
for (var x in children) {
if (!children.hasOwnProperty(x)) continue;
...
b) Use index-based iteration
for (var x=0; x<children.length; x++) {
...
When executing jshint against your code, it ends with a "too many errors" message. The cause is the simple. All conditions in the code that check for 'undefined' variables and parameters are using == or != operators. This is a weak coding practice.
I modified the code on my side to fix the situation. The attached screen captures show you the type of the changes I made to address the problem.
Best regards
There is a typo, saturnation, within in this method:
addDesaturate: function (saturation, attributes) {
if (saturation == undefined) {
saturnation = 0;
}
Hello,
First, Many thanks for your plugin ! awesome
I have a bug on IE (9), no filters are displayed... and it crashes my app...is there any known trouble with this ?
thanks for your answer.
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.