Implicitely call document.redraw() at the end of PaperScript execution.

This commit is contained in:
Jürg Lehni 2011-03-05 22:02:53 +00:00
parent af909238eb
commit 1607d744ef
7 changed files with 3 additions and 6 deletions

View file

@ -53,7 +53,6 @@
}
document.activeLayer.appendBottom(path);
}
document.redraw();
</script>
</head>
<body>

View file

@ -41,7 +41,6 @@
var path = new Path.Circle(center, i * 5);
path.strokeColor = 'black';
}
document.redraw();
</script>
</head>
<body>

View file

@ -54,7 +54,6 @@
);
letterPath.closed = true;
letterPath.fillColor = 'black';
document.redraw();
</script>
</head>
<body>

View file

@ -38,7 +38,6 @@
<script type="text/paperscript" canvas="canvas">
var path = new Path.Rectangle([50, 50], [100, 100]);
path.strokeColor = 'black';
document.redraw();
</script>
</head>
<body>

View file

@ -51,7 +51,6 @@
path.smooth();
document.activeLayer.appendBottom(path);
}
document.redraw();
</script>
</head>
<body>

View file

@ -69,7 +69,6 @@
path.strokeJoin = 'miter';
path.strokeCap = 'butt';
console.log(path.segments);
document.redraw();
</script>
</head>
<body>

View file

@ -127,6 +127,9 @@ var PaperScript = new function() {
}
});
}
// Automatically redraw document at the end.
if (paper.document)
paper.document.redraw();
return res;
}
}