Как я могу нарисовать несколько кругов с помощью paperjs? Я попытался удалить path.removeOnDrag()
, он работает, и после удаления fillcolor
результат не такой, как ожидалось.
<script type="text/paperscript" canvas="canvas">
function onMouseDrag(event) {
// The radius is the distance between the position
// where the user clicked and the current position
// of the mouse.
var path = new Path.Circle({
center: event.downPoint,
radius: (event.downPoint - event.point).length,
fillColor: null,
strokeColor: 'black',
strokeWidth: 10
});
// Remove this path on the next drag event:
path.removeOnDrag();
};
</script>