ValentQ
ValentQ

Reputation: 53

Javascript 2d drawing in IE

I need to fill polygons with certain colors when they are clicked. Polygons are drawn on the background image. I'm using map and area tags to detect click on polygon and then using moveTo(), lineTo(), closePath() and fill() to draw filled polygon on the top. Is it possible to use javascript drawing functions mentioned above in IE7, IE8 and IE9? Code works fine in firefox and chrome, but doesnt work in IE.

Is using canvas element the only possible way of drawing with javascript? I mean core javascript, without using third party libraries.

Upvotes: 0

Views: 302

Answers (1)

indieman
indieman

Reputation: 1121

RaphaelJS is a library for working with SVG elements. It's great because it

  1. provides support for older browsers by using VML
  2. has an easy to use, well documented API for creating and animating SVG elements
  3. has wrapper function for events, so it's easy to implement the onclick events you are talking about

Upvotes: 0

Related Questions