Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scripting SVG

I'm considering developing a website similar to stackoverflow, but the answers may also consist of drawings (schematics, in this case). I want to have an area in the answer form where they can make this schematic without requiring special plugins, etc.

  1. Are we to the point where SVG has or should have critical mass soon (1-2 years) such that designing a website where script-run SVG as a primary feature is reasonable (ie, requiring Firefox or another SVG/AJAX compliant browser)?
  2. What are some good resources for learning cross platform SVG scripting (likely in javascript)?

-Adam Davis

like image 240
Adam Davis Avatar asked Aug 28 '08 20:08

Adam Davis


People also ask

Can SVG contain JavaScript?

JavaScript can be added anywhere in an SVG document between the opening and closing <svg> tags. In general, a script should be placed at the end of the document to avoid blocking and allow the script complete access to the DOM.

Can SVG modified through script?

SVG can be modified through script and CSS.

What does SVG stand for?

Scalable Vector Graphics (SVG) is a web-friendly vector file format. As opposed to pixel-based raster files like JPEGs, vector files store images via mathematical formulas based on points and lines on a grid.

What is SVG in HTML?

SVG is a language for describing 2D graphics in XML. Canvas draws 2D graphics, on the fly (with a JavaScript). SVG is XML based, which means that every element is available within the SVG DOM. You can attach JavaScript event handlers for an element. In SVG, each drawn shape is remembered as an object.


1 Answers

Raphael looks like an interesting take on the problem of cross-browser vector graphics.

like image 102
Jim T Avatar answered Nov 15 '22 19:11

Jim T