Paperjs does not save the original Path and does not remember any operations that were applied to achieve the current state, so it can be difficult to reset to the previous state. The easiest approach is to use this.scale , which your current code computes, and when you want to reset do this.circle.scale(1/this.scale); Here is jsfiddle this way.
FYI, here is the code path for scaling:
Item.scale()Item.transform()Item.apply()Path._apply()Segment._transformCoordinates()
So, the end result is that _transformCoordinates() is called on each of the four segments in the circle and simply moves the coordinates of the point ... nothing is remembered to βcancelβ the scaling later.
Alternatively, to memorize the scale, you can use the Path.fitBounds () function to reduce the circles to an arbitrary size ... for example, you could save the bounding box right after creating the circle, and then unlink to that size.
source share