New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working in Opera #24
Comments
Hi, |
Hi, thanks for the quick reply. Actually the error happens on your demo page as well (only when using Opera browser). Have you tested the demo in Opera? thanks again! Jordi |
Owww.. Ouch! |
Linux. Hope you find a fix :) |
I've made some tests today. On Max OS, no issues. But Ubuntu, exactly this. I don't know why the engine behave differently on the Linux version. To make it simple, when an Vivus instance is created, the code check the node element is a No idea why, but I'll update the checking process to fix this. Thanks for spotting it :-) |
Awesome! Glad you could sort it out! |
My tests shows some problems too with Safari on Mac. I haven't tested this in other browsers but here's my solution: I load a svg via from an exernal file like: Vivus can't work in this as the element is (onLoad) an SVGSVGElementConstructor. So change vivu.js on line 43 + 332 from: if (element.constructor === SVGSVGElement) { to if ( _checkElm(element) ) { and on the top of your js file directly after 'use strict'; put this function: var _checkElm = function(elm){ So with this little patch you could directly address an svg by dom. HTH somebody |
^^this is the source (didn't show up in the comment above) |
@jolic This issue is not related to the original one from @jordif. Your error is due to the usage of On the other side I'm curious about what you try to achieve. Did you really managed to make Vivus working with an |
@maxwellito The benefit is that you can keep the svg file as an external reference and the svg can have javascript code inside the svg file which is executed onload. So we have one point where you can have the markup for the graphic and the animation logic. I'm preparing a fork to show some examples. |
Pls stop spam me Dne úterý 17. února 2015 jolic notifications@github.com napsal(a):
|
@fantic Sorry about that, but you're not even part of this issue. You should unwatch this repo and review your notification settings. |
hi, i've made a patch: https://github.com/jolic/vivus/tree/master/_PATCH btw... how can i create a page on github to show the html file directly? |
To create a page on GitHub use the About your trick, now I understand how it works. I was quite curious about the possibility to update a DOM of an object element. Tbh, I'm not really fan to oblige devs to update their SVGs to make it work dynamically (especilly to include scripts into it). But some people might be interested and it doesn't involve massive changes on the code. I'll have a closer look this weekend, it looks interesting :-) |
Good. ;) In my opinion all logic to control a graphic should reside inside the graphic as we can do this with SVG. See the SVG graphic as a class. The SVG provides some methods to control whatever you want to do with it. Like a Flash SWF where you can define methods which are available from outside. So, if the SVG needs the Vivus js file or whatever it should import it, not the referencing page which uses the SVG. And the SVG should deliver methods to control the graphic. Have a look at a simple watch as SVG. With SVG you can animate the second, minute and hour with SVG or JS inside the SVG. What if you want to display a custom timezone? The better way is to put the logic to position the elements within the SVG. So, with this example you could do something like this (in pseudo code):
With this you have one point of code for the manipulation which is loaded within the SVG and the graphic works alone (as long as it's placed as Thanks |
just added another example with Vivus.prototype.setStrokeColor |
I made a github page http://jolic.github.io I will not spam you here anymore. ;) If you need help in node/JS contact me.... |
This bug is now fixed in the last release. |
Hi,
very nice plugin, thanks for sharing!
Not sure why, but Opera is throwing this error (also when visiting the demo site):
Uncaught exception: Error: Vivus [constructor]: "element" parameter must be a string or a SVGelement
Any ideas?
Thanks
The text was updated successfully, but these errors were encountered: