mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-13 16:23:11 +00:00
Fix url of assets in animation demo.
This commit is contained in:
parent
0e3831ed6f
commit
e19a596d65
2 changed files with 9 additions and 11 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@
|
|||
<button>Change</button>
|
||||
<span style="margin-left: 30px">
|
||||
Shape size:
|
||||
<input type="range" value="0.5" min="0.1" max="5" step="0.1" id="scale-object">
|
||||
(<b id="scale-object-output">0.5</b>)
|
||||
<input type="range" value="1" min="0.1" max="5" step="0.1" id="scale-object">
|
||||
(<b id="scale-object-output">1</b>)
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue