Skip to main content

All Questions

Tagged with
-1 votes
1 answer
39 views

how to get center coordinates of rectangle in raphaeljs

I tried to get from rect.cx and rect.cy from RaphaelJS.rect API. But I am getting undefined in the console. I tried var cx = rect.cx; var cy = rect.cy; and console.info(rect.cx); console.info(rect.cy)...
Sun's user avatar
  • 3,494
0 votes
1 answer
30 views

How to create point at left edge mid of rectangle in raphael js

I am trying to create a circle at the left edge middle point of the rectangle. But it not creating. <script type="text/javascript"> window.onload = function () { ...
Sun's user avatar
  • 3,494
1 vote
0 answers
117 views

How can I plot against a curved path on an svg at specific x positions on the path?

I have a 2 rows of circles (imagine 2 rows of seats in a seating chart) that are on straight line, like this: I need to curve the rows relative to the longest row (ie row B). I can correctly ...
Matt Kim's user avatar
  • 747
1 vote
1 answer
58 views

How to know the m or M point of path from all of points in svg?(use raphael.js)

I have an svg picture like this, with M and m in the path. I use raphael.js to calculate. I can get all the points by calling Raphael.getTotalLength(path), but how can I know from which point is the ...
penggelies's user avatar
0 votes
2 answers
67 views

select div by id using vanilla JS instead of JQuery $ selector to apply Raphaeljs method

I'm using RaphaelJs' mousedown() method. The problem is, I want to apply mousedown() on div which is being selected using $(id) selector of JQuery. I want to use vanilla Js for it because I don't want ...
kapil sarwat's user avatar
1 vote
2 answers
205 views

Need help extracting numbers from string in JavaScript

I need a rock solid RegExp to try and solve some issue with Raphael.js parseStringPath processing regarding Arc path commands and possible others (SnapSVG also inherits the problem). You see, arcTo ...
thednp's user avatar
  • 4,449
0 votes
1 answer
50 views

Setting double borders in Raphael with `setAttribute`

In this jsFiddle I have two SVG rects. The first one inside an SVG tag, the second one rendered with Raphael JS. Both rects should be identical with double borders, but they are not. Using node....
ps0604's user avatar
  • 1,101
0 votes
1 answer
173 views

Rect in Raphael JS doesn't have the same stroke width in all the sides

In this jsFiddle I have a Raphael JS paper with a rect. If you zoom in you will see that the bottom and right lines of the Raphael rect are wider: How to fix this rect to have the same width in all ...
ps0604's user avatar
  • 1,101
1 vote
0 answers
68 views

Collapsing svg group with Raphael.js

I'm working with svg through Raphael.js and I need to collapse SVG group and show it on click. I've tried to use 'visibility' attriburte of SVG group and change it on click, but it is ok with hiding ...
Zixel's user avatar
  • 421
0 votes
1 answer
59 views

How to use percent on Raphael js Paper.path?

Using Rephael js we can do something like: paper.circle('20%', '20%', 30); My question is: how can I do something like (note the use of %): paper.path('M 20% 20% L 100 150');
Erick Lanford Xenes's user avatar
0 votes
2 answers
1k views

Error: <tspan> attribute dy: Expected length, "NaN". | Error: <path> attribute d: Expected number, "M,0,0". | Raphael.js | wheelnav.js

I am trying to create circular menu with wheelnav.js library. Even though it seems to work I get thousands of errors in chrome console. Error: attribute d: Expected number, "M,0,0". Error: ...
matvs's user avatar
  • 1,823
1 vote
1 answer
262 views

Unicode entity in menu item of wheelnav.js library (using under the hood raphael.js) [SVG]

Since wheelnav.js libray allows programmer to define menu item as text or image. Never both at the same time for one menu element, and I need icon + text I came up with encoding icon as a unicode ...
matvs's user avatar
  • 1,823
0 votes
0 answers
79 views

Any older Browser version which supports SVG, but not canvas?

The latest version of browsers (like Chrome) by default support Canvas, and not SVG. Hence, in this code in js - if (Modernizr.canvas) { require(['jCanvas'], _.bind(_callCanvasMethod, ...
user avatar
0 votes
0 answers
76 views

Raphael.js - filling a combined custom shape

I have an SVG path that is a shape within another shape. If I add a stroke to the path the shape is outlined perfectly so I know the path is correct. However if I choose to fill the shape, both the ...
RobertyBob's user avatar
0 votes
1 answer
263 views

Filling an existing svg rectangle with text

I'm trying to use JavaScript to create an SVG rectangle with text in it. I've already got the rectangle (generated by morris.js, a charting library) but can't seem to be able to get the text in. The ...
Adriaan Marain's user avatar

15 30 50 per page
1
2 3 4 5
67