svg

jQuery under SVG

Is there any way I can run jQuery under SVG instead of HTML? I know about jQuery svg plugin but this is not what I want. As for now the jQuery engine contains some statements like this: div = document.createElement("div"); div.style.display = "none"; It fails with exception during jQuery initialization under SVG because SVG docume...

Making an svg image object clickable with onclick, avoiding absolute positioning

I have tried to change the images on my site from to svg, changing img tags to embed and object tags(standard procedure, i think). But, implementing the onclick function, which previously was contained in the img tag is proving most difficult. I found onclick had no effect when placed inside the object or embed tag. So, I made a div ex...

dojo and Displaying Inline SVG

I am attempting to display a dynamically created SVG inline in a dojo based application and am running into some difficulty. When I navigate directly to the SVG, it renders fine in Firefox 3.5/3.6 and Chrome, but when I inline it, verifying I have the right DOCTYPE and XML namespaces, both Firefox and Chrome just display a pile of text ...

Why doesn't SVG work on local HTML files?

I'm confused. If I point by browser (Chrome or Safari on OSX) to this web site, it shows all the SVG perfectly: http://emacsformacosx.com/ Now, if I view source on that page, copy it, and paste it into a new HTML document on my desktop, then view that with either browser, I get no SVG at all. Why the difference? Why does SVG work on...

Can the Django dev server correctly serve SVG?

I am trying to serve a svg map using: <object data="map.svg" type="image/svg+xml" width="400" height="300"> <embed src="map.svg" type="image/svg+xml" width="400" height="300" /> </object> In Firefox this leads to a plugin prompt. If I rename map.svg to map.xml it shows the image correctly. I assume this is because the Django's dev...

How do I render *parts* of a svg file?

Hello good people! :) I want to render parts of a svg file by name but for the life of me I cannot figure out how to do so (using python + gtk). Here's the svg file in question: http://david.bellot.free.fr/svg-cards/files/SVG-cards-2.0.1.tar.gz (Update: this file no longer exists, but you can track it down at http://svg-cards.sourcefor...

Ecmascript in XHTML or SVG

Which is better? To use Ecmascript inside your SVG which is embedded in XHTML sent as application/xhtml+xml or to use Javascript (ecmascript) inside the XHTML within which the SVG to be manipulated is embedded? It feels better to use it inside the SVG, but that's just me. Is there any actual value in any of the methods or are they the s...

Zooming and panning svg images using raphael.js or some other js library

Hi there first off all thanks for looking , I am in need of a small script that will display an SVG (vector image) within a frame that has 2 functions; 1 - The image can be panned (moved around to look at different parts of the svg image with the cursor) simmilar to google maps. 2- The SVG image can be zoomed in and out on also simmil...

Displaying SVG using XSLFO

Hi, StackOverflow, First question from me; I'm currently fixing a graphing service that uses XSLFO to convert our syntax to FO, and converting it to PDF in the end. Previously we've been using PNG graphs from the web in the PDF exports, but this creates really ugly results, so we've decided to go with SVG for PDF instead. However, the...

Want to show svg in an iframe and show a scrollbar to let users to pan the image in chrome/ie8

html: <iframe scrolling="yes" src="svgfile.svg"></iframe> svgfile.svg: <svg width="2636pt" height="2478pt" viewBox="-1 -1 2635 2477" xmlns="..."> <g id="node1" class="node">....</g> ... </svg> This won't show the scrollbar in chrome/ie8... This was OK in FF... Other solution not using iframe can be acceptable. Or ju...

How do I embed a transparent SVG object inside an HTML document?

I'm using an SVG object embedded in HTML using the tag. The SVG gets painted with a white background. How can I get rid of it and make the element transparent so that the HTML background shows through. There is supposed to be a way to do this in IE with Adobe's SVG viewer using the wmode attribute. How do I do this in WebKit or Mozilla...

Raphael JS library how to disable text shift on multi-line

Hello, By default when adding text object to paper Raphael javascript library centers text around y point. It basically takes the height and divides it by 2 and attaches text to the new y coordinate. I'm looking for a different behavior where text stays at the same coordinate even when you add multi lines. I was wondering if anyone ha...

SVG to Java's Path2d parser

Hi there. Is there an application to convert a svg drawing to Java's Path2d? Is this method more efficient than using any SVG to Java toolkit? (with efficiency i refer to runtime speed). Thanks. ...

How to find elements by 'id' field in SVG file using Python

Below is an excerpt from an .svg file (which is xml): <text xml:space="preserve" style="font-size:14.19380379px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sa...

Jquery remove drawn line added via jquery svg library

Hi, In my application I have a line drawn from one table cell to another cell through jQuery SVG plugin. Following the steps of the blog post http://www.openstudio.fr/Library-for-simple-drawing-with.html I managed to add it. But at the same time I need to remove that line and draw it on another place when mouse hovers. Is there a metho...

Get empty image when transcoding SVG to PNG

Hi, I'm trying to generate an SVG image and then transcode it to PNG using Apache Batik. However, I end up with an empty image and I can't see why. I use the Document from SVGDomImplementation as the base for my transcoding (to avoid writing the SVG to disk and loading it again). Here's an example: DOMImplementation domImpl = SVGDOM...

Performance of RaphaelJS with thousands of paths/rectangles

Hi, I really only care about Webkit, but in general, is Raphael JS expected to perform well when building thousands of rectangles? Additionally, I would need to be able to handle events on each of these rectangles (yipes). I've got a C++ solution which works but I'd rather use RaphaelJS. Thanks :) ...

SVG Salamander example?

Hi there. I'm toying with Java and SVG Salamander but cant quiet get how to render a simple SVG file into a Jpanel. Could someone give me a brief example? Tried to follow the loose tutorial in the official site, but could not find a simple code to get a better understanding. So, some code is really appreciated! Thanks! ...

RaphaëlJS, dojo.gfx, JSXgraph comparison

I'm going to build a simple math graph for a browser application. Therefore all the JS-Vector Libraries might work out well. But I want to know about any experiences you collected using those. For me a basic feature is binding events to paths and points as well as animating paths. Additionally I am thinking how they are mastering the fu...

How well are SVG filter elements defined?

We are considering using SVG filters as part of our toolchain, serving the SVG to browsers capable of supporting it, while serving pre-rendered PNGs to other. One problem we noticed is that the rendering of the filter chains seems to be very inconsistent across renderers. When looking at the "filters01" example from the SVG specificatio...