I defined my raphael paper as below:
var paper = Raphael("my-paper", '100%', '100%');
As you saw above, I defined my Raphael paper, then drew some shapes on my paper. I have the following two questions:
1. How to get the value of x and y at the central point of my article. (x: horizontal, y: vertical)
2. I would like to scale everything on my paper to twice the size, I know that I can use the Raphel scale function . I would like to scale all the elements on the paper relative to the center of my paper , so I need to do something like:
e.scale(2, 2, CENTER_X, CENTER_Y)
( CENTER_X and CENTER_Y are asked in question 1 )
I would like the result to look like an increase, am I using it correctly or are there other ways to do this?
source share