Scaling multiple paths with raphael

前端 未结 2 896
[愿得一人]
[愿得一人] 2021-02-10 03:33

I\'m trying to use Raphael to create a map tool similar to this example in the webpage.

I have an svg file of the map I want to use, and the provinces are all separate p

2条回答
  •  天涯浪人
    2021-02-10 03:43

    scale can accept four parameters:

    scale(x, y, cx, cy);
    

    where cx and cy are coordinates of the centre of scaling. By default it is in the middle of the shape. So, to scale two shapes you need to scale then relative to the same centre.

提交回复
热议问题