From e19a596d6557e98fff236cc1119166ad2792ff73 Mon Sep 17 00:00:00 2001
From: kangax
Date: Sat, 2 Jul 2011 01:45:41 -0400
Subject: [PATCH] Fix url of assets in animation demo.
---
benchmarks/animation/animation.js | 16 +++++++---------
benchmarks/animation/index.html | 4 ++--
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/benchmarks/animation/animation.js b/benchmarks/animation/animation.js
index 7ab80af3..cd1e6601 100644
--- a/benchmarks/animation/animation.js
+++ b/benchmarks/animation/animation.js
@@ -99,7 +99,7 @@
function loadShape() {
for (var i = coords.length; i--; ) {
(function(i){
- loadSVGFromURL('../demo/assets/' + shapePath, function(objects, options) {
+ loadSVGFromURL('../../demos/kitchensink/assets/' + shapePath, function(objects, options) {
var pathGroup = new fabric.PathGroup(objects, options);
pathGroup.set({
@@ -112,15 +112,13 @@
canvas.add(pathGroup);
- if (i === 0) {
- canvasObjects = canvas.getObjects();
- if (canvasObjects.length > 0) {
- animate();
- }
- setTimeout(function() {
- complexityEl.innerHTML = canvas.complexity();
- }, 50);
+ canvasObjects = canvas.getObjects();
+ if (canvasObjects.length === 4) {
+ animate();
}
+ setTimeout(function() {
+ complexityEl.innerHTML = canvas.complexity();
+ }, 50);
});
})(i);
}
diff --git a/benchmarks/animation/index.html b/benchmarks/animation/index.html
index 9cd96b8b..016db7fa 100644
--- a/benchmarks/animation/index.html
+++ b/benchmarks/animation/index.html
@@ -43,8 +43,8 @@
Shape size:
-
- (0.5)
+
+ (1)