raphael-js

jQuery $.position() on Safari & Chrome

Hello there, I have an issue using $.position to retrieve the relative x/y offset on an element. It was mentioned before that both Safari and Chrome differ in handling it as the others. I'm using Raphael-JS. To cut the long story short, what I have is an SVG element wrapped by the parent, centered DIV wrapper: <div> <svg> ...

what does (gs.left != (t = left + "px") && (gs.left = t);) do?

IE appears to be choking on the following line 2207 from the uncompressed raphaeljs 1.4.7 (in the context of my code, of course): gs.left != (t = left + "px") && (gs.left = t); I'm unfamiliar with the != syntax in this context so I'm finding difficult to figure out what is going on or why IE might be unhappy about it. I've tested in I...

Drawing over an image using Raphael.js

Can I put a Raphael.js canvas over an IMG element? What should I do make this layout work? ...

How come my Raphael.js circle object is not getting its 'attr' changes animated & not getting the jQuery HandlerOut event object applied to it?

I have created a #logo DIV that consists of a smaller #circle DIV & h1. The #circle acts as the DIV/canvas that my Raphael.js object, a circle, is rendered in. My goal was to make it so when a user hovers over the #logo DIV the Raphael.js circle and h1 will get animated but I ran into some problems. For some reason my Raphael.js circle...

How to do a screen capture of content on web page/join 2 images

I have a page where I am using Raphael.js to actually allow user to move a dot around the canvas which has a background image. What I am trying to do is to capture the end image of the canvas where I'll be able to see where the user placed the dot after the user clicks on a 'confirm position' button. I've thought of two methods, however ...

What are the pros and cons of HTML5 Canvas vs. SVG + Raphael.js?

I just started a project using the Canvas. But one of the things I need is to keep track of movable, clickable boxes as in this example : http://raphaeljs.com/graffle.html so I'm wondering if Raphael-js + SVG would be better. Which would you use? And why? ...

Draw a Connection Line in RaphaelJS

How would I go about drawing a connection line in Raphael where the mousedown initiates the starting point of the line, the mousemove moves the end point without moving the start point and the mouseup leaves it as it is? ...

how to dynamically update svg using Raphael?

Hi all, I'm trying to write something to simplify experimentation with SVG path, but i have a problem where it doesn't actually update the screen when i can verify that the svg code is updated. Basically the work flow is as follows: I type something into the input box (A path string), and click draw, it will clear the canvas, then draw ...

RaphaelJS: Creating click-through elements?

I need to overlay a label on top of multiple clickable elements. I want to be able to click on an element through the label on top of it. Is this possible? If so, how would I accomplish this? ...

Raphael JS -- animate .text()

So I'm using Raphael JS to try and animate. Here's what I've tried: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript" ...

raphaeljs drag n drop

hi all, I am using rapaeljs for my web app i want to set dropable boundries of the object.Object can move in dropable area. Once an object come in dropable area no way of out for object ...

Opening a link from a Raphael node into a lightbox

I am using fancybox for my lightbox needs. I have a need to open a link from a raphael element (in this demo a circle). Normally you would create a link and style it like so: <a id="test" href="ajax.html">Click Me</a></li> <script type="text/javascript"> $(document).ready(function() { $('#test').fancybox({ 'width' ...

javascript scope problem

I am using Raphael.js library for a specific work. I am creating circles and binding hover event that show/hide text. The problem is that only the text over last circle is shown/hidden, even i am hovering over other circles. plz chk this code for(var i=0; i<feedData.length; i++){ var x = ((i+1)*diff); ...

How to use RaphaelJS to draw an existing vector image

I am starting to learn RaphaelJS, but it does seem to be a steep learning curve as I am not very versed in javascript. But it seems like such a good library that I am willing to put the time in to learning it. What I would like to know is: How can one use an existing vector image in RaphaelJS (If I download a "vector" image can I tel...

Graphael line chart

Hi Is there a good tutorial for Graphael (special line charts), I currently trying to implement such a graph with grafael http://www.highcharts.com/demo/?example=line-time-series&amp;theme=default unfortunately there is no documentation. ...

how to set font-size font-family

i have code like this but its not working var t = r.text(100, 100, 'test'); t.attr({font-size: 16}); giving me error missing : after property id here is documentation for raphael.js http://raphaeljs.com/reference.html ...

animating path's width

i have a path like this var r = Raphael('graph', 600,400); var l = r.path('M 300,185 L 75,185 Q 65,200 75,215 L 300, 215 Z'); i want the path to animate to final position var l1 = r.path('M 350,185 L 75,185 Q 65,200 75,215 L 350, 215 Z'); Its a rectangle but curved from left side. I want to animate its right side to left/r...

Update pie slice size in Raphael pie chart

I'm working on making a pie chart that shows results over time. As such it needs to animate between states to show how different slices change. I've figured out how to change all the slices en masse (using this example as a starting point), but I would like to be able to select and manage a particular slice (or sector as Raphael calls it...

How/when is this anonymous function invoked?

Hi. I'm new to javascript and I am looking through some Raphael demo code. I'm confused by how this is working... if (R) { (function (dx, dy, R, value) { var color = "hsb(" + [(1 - R / max) * .5, 1, .75] + ")"; ... From what I can see this is declaring an anonymous function which takes 4 arguments. How is this function inv...

why do getOffsetWidth() and getElement().getClientWidth() return 0 for a Widget in GWT?

I'm using RaphaelGWT to draw shapes with the underlying RaphaelJS library. Both projects are wonderful. However I was stuck for awhile on the issue of Text objects in Raphael being displayed as centered by default. I've tried to create one Text object and let it be centered by default, then measure its width in order to adjust the posit...