svg

How to access SVG elements with Javascript

I'm messing around with SVG and I was hoping I could create SVG files in Illustrator and access elements with Javascript. Here's the SVG file Illustrator kicks out (It also seems to add a load of junk to the beginning of the file that I've removed) <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "...

How can i get the absolute position of an SVG element inside the SVG tag using javascript?

Hi! I am trying to return the absolute position of an element in a SVG. I have tried using basic javascript functions to return the relative position but I only have access to the contentDocument since the SVG is embeded using an OBJECT tag. Because of this I cannot recurse thru the elements to find the position of the element positio...

How can I get the x/y coordinates of an SVG element(path etc) that does not have the X/Y attributes?

Hi! I am trying to get the position of SVG elements using Javascript. I have managed to get the position on elements that have X/Y attribute set. But elements, such as paths does not have this attribute.. At least not in my docuements. Is there a way to calculate the position other than taking the first number in the "path"? Thank you...

Wicket and SVG - any components exist?

SVG DOM can be controlled with JavaScript, so it can be AJAX-enabled... I wonder if there are some SVG components for Wicket yet. And if Wicket can have pure xml/svg as the output format. Quick googling shows only a question at Code Ranch. ...

Any ideas on how to implement a 'touchMoveOver' event in Javascript?

I'm faffing around with SVG, specifically for web content aimed at iPad users. I've created a little dial type thingy that I'm calling a "cheese board" that I'd like to use as an interface element. http://appliedworks.co.uk/files/times/SVGTests/raphael.html Clicking on a piece of cheese (to keep the analogy going) will do "something"....

How to draw a map on a webpage that have links inside some area defined by the map?

I need to put a map in a webpage and I need that when the users clicks on certain area inside city limits on the map the user is redirected. Wich is the best way without using Flash? Define Hover polingons on a image. SVG on the browser. Some sort of Javascript, jQuery magical plugin out there? Google Maps? And example could be this...

Where can I find a powerful, standards compliant, web-based interactive org chart API?

Hi, I'm looking to build an interactive web-based org chart for a large organization. I somewhat like the interface at ancestry.com where you can hover over people and pan/zoom around and click on different nodes to make them the root. Ideally, I'd like it if people could belong to multiple organizational entities like committees, work...

SVG in JAVA not displaying correctly

Ok, I have a java program, that displays some tiles that are SVGs in a FlowLayout. Does this by being a class ScrabbleRack, and extending JPanel, then adding JSVGCanvas tiles to this panel. Afterwards I created a frame and added the panel, this.(packed it and displayed it). On appearing, the panel does not display properly. It just dis...

How about using SVG(Scalable Vector Graphics) on desktop applications?

I am working in Train Traffic Controller software project. My responsibility in this project is to develop the visual railroad GUI. By now I am using some svg graphics in that GUI. I prefer them because of their scalability talents. Is it good or bad idea to use svg in a desktop application? Any suggestions? ...

SVG coords to VML coords

i have svg file <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="200px" height="" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 69.1341 93.4405" xmlns:xlink="http://www.w3.org/...

XSL Transform SVG to VML

I don't know anything about VML except that Internet Explorer and other Microsoft products use it and that it is a vector graphics format. Can one use XSLT to transform an SVG document to VML? Or are they too different from one another to make this possible? I know that there exist XSLT documents to transform SVG to XAML. ...

SVG Filters in Firefox

For some reason I can't get my SVG filters to work in Firefox. They work fine in Opera, however. The element whose property I set to the filter on just disappears. It's very odd. Here's my javascript code: defsElement = SVGDoc.createElement("defs"); var filterElement = SVGDoc.createElement("filter"); filterElement.setAttribute( "id", "...

Raphael JS - Parsing an SVG on the fly

I found a neat SVG parser at http://bkp.ee/atirip/ which parses an SVG file and outputs it into javascript that uses the Raphael JS library (raphaeljs.com). You'll notice in the source code at http://bkp.ee/atirip/svg2rdemo.php : <script> jQuery(document).ready( function() { $("#c1").each(function(){ var c = Raphael(this, 19...

Support SVG on mobile platforms

Which mobile platform browser fully supports SVG? Interested JS + Raphaël + touchscreen ...

onload Event in embedded SVG not calling function in attached script. Scope Issue?

Hi So I've got an XHTML page with a script - not inline > <script type="text/javascript" > src="../global/js/scripts.js"></script> and an embedded (I tried embed and object, same behavior) SVG document with a onload="CheckIfLoaded(evt)" attribute. The problem is firefox doesn't call the CheckIfLoaded() function in scripts.js. Firebu...

SVG parser for C++? (Free or paid)

Does anybody know of a good SVG parser that puts out an SVG object in C++? I don't mind if it's free or paid. I'm just looking for one that is cleanly architected and adheres very well to the spec. Preferably one that would let me start rendering by just inspecting the structures and passing the info on to Cairo or QT. Thanks! ...

How to write a XSLT for this XML?

<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt; <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x=...

Firefox -- Dynamically embedding <svg> element in SVG

I am trying dynamically to append an <svg> element to an existing SVG island on an XHTML page (Firefox 3.6.3). And it is crashing the browser. Done manually, this works as expected: <svg xmlns="http://www.w3.org/2000/svg"&gt; <svg xmlns="http://www.w3.org/2000/svg"&gt; ... </svg> </svg> However, if you dynami...

jsTree and SVG Editor conflict in active selected items?

Hi, I'm using jsTree and SVG-Edit in the same file but there is a conflict in the active selected item. For example I clicked a tree item then I cannot draw in the svgcanvas div anymore. Maybe because of you click the item in jsTree then it's always selected and the svgcanvad div will not be active anymore? Any help, tips or tutorials ...

How to implement a book preview (2 page spread) without using Flash?

I'm looking into a solution for work, where you have a two page spread of the book to preview. Either side of this, you can hover in the corner to create a pseudo-flip and then click the mouse button to actually turn the page. I know there is many Flash solutions out there, but in this case we cannot use it... So we are looking for a pos...