From e77caf610b7ec6b6f04cc3b5b7ee5e8f322a9161 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sun, 19 Jun 2011 17:34:32 +0200 Subject: [PATCH 1/2] Update BouncingBalls example to the version on Paperjs.org --- examples/Scripts/BouncingBalls.html | 59 ++++++++++++++++------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/examples/Scripts/BouncingBalls.html b/examples/Scripts/BouncingBalls.html index 8ae00bfe..1a6bb5f5 100644 --- a/examples/Scripts/BouncingBalls.html +++ b/examples/Scripts/BouncingBalls.html @@ -7,10 +7,6 @@ -

Click to add circles:

- + \ No newline at end of file From c16792048026538cc3540ce93fcc5027661d96d7 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sun, 19 Jun 2011 17:37:43 +0200 Subject: [PATCH 2/2] Examples: replace use of deprecated functions. --- examples/Animated/AnimatedStar.html | 2 +- examples/Animated/Extruded.html | 2 +- examples/Scripts/Arcs.html | 2 +- examples/Scripts/DivisionRaster.html | 4 ++-- examples/Scripts/PhyllotaxisRaster.html | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/Animated/AnimatedStar.html b/examples/Animated/AnimatedStar.html index f46bd572..ab4ebff5 100644 --- a/examples/Animated/AnimatedStar.html +++ b/examples/Animated/AnimatedStar.html @@ -27,7 +27,7 @@ } path.smooth(); var placedSymbol = new PlacedSymbol(path); - layer.appendBottom(placedSymbol); + layer.insertChild(0, placedSymbol); } layer.position = view.center; diff --git a/examples/Animated/Extruded.html b/examples/Animated/Extruded.html index ef05b294..98d31b54 100644 --- a/examples/Animated/Extruded.html +++ b/examples/Animated/Extruded.html @@ -28,7 +28,7 @@ for (var i = 0; i < lineCount; i++) { var linePath = new Path.Line([0, 0], [0, 0]); linePath.strokeColor = 'red'; - lineGroup.appendTop(linePath); + lineGroup.addChild(linePath); } var path1 = new Path(); diff --git a/examples/Scripts/Arcs.html b/examples/Scripts/Arcs.html index 39ea9080..2a8079be 100644 --- a/examples/Scripts/Arcs.html +++ b/examples/Scripts/Arcs.html @@ -21,7 +21,7 @@ path.arcTo(point + vector, true); } } - project.activeLayer.appendBottom(path); + project.activeLayer.insertChild(0, path); } diff --git a/examples/Scripts/DivisionRaster.html b/examples/Scripts/DivisionRaster.html index 6956f040..a95c62aa 100644 --- a/examples/Scripts/DivisionRaster.html +++ b/examples/Scripts/DivisionRaster.html @@ -46,7 +46,7 @@ function onMouseMove(event) { var topLeft = bounds.topLeft.floor(); var path = new Path.Rectangle(topLeft, size.ceil()); path.fillColor = raster.getAverageColor(path); - path.moveBelow(child); + path.insertBelow(child); var secondPath = path.clone(); size = size.floor(); @@ -54,7 +54,7 @@ function onMouseMove(event) { ? [size.width, 0] : [0, size.height]; secondPath.fillColor = raster.getAverageColor(secondPath); - secondPath.moveBelow(path); + secondPath.insertBelow(path); // Remove the path which was split: child.remove(); diff --git a/examples/Scripts/PhyllotaxisRaster.html b/examples/Scripts/PhyllotaxisRaster.html index 246c9784..1d026e83 100644 --- a/examples/Scripts/PhyllotaxisRaster.html +++ b/examples/Scripts/PhyllotaxisRaster.html @@ -46,7 +46,7 @@ var cornerSize = new Size(radius / 4); var path = new Path.RoundRectangle(rectangle, cornerSize); path.rotate(i * rotation + 45); - group.appendTop(path); + group.addChild(path); } return group; }