All Questions
999
questions
-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)...
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 () {
...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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');
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: ...
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 ...
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, ...
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 ...
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 ...