mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Implicitely call document.redraw() at the end of PaperScript execution.
This commit is contained in:
parent
af909238eb
commit
1607d744ef
7 changed files with 3 additions and 6 deletions
|
@ -53,7 +53,6 @@
|
|||
}
|
||||
document.activeLayer.appendBottom(path);
|
||||
}
|
||||
document.redraw();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
var path = new Path.Circle(center, i * 5);
|
||||
path.strokeColor = 'black';
|
||||
}
|
||||
document.redraw();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
);
|
||||
letterPath.closed = true;
|
||||
letterPath.fillColor = 'black';
|
||||
document.redraw();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
path.smooth();
|
||||
document.activeLayer.appendBottom(path);
|
||||
}
|
||||
document.redraw();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
path.strokeJoin = 'miter';
|
||||
path.strokeCap = 'butt';
|
||||
console.log(path.segments);
|
||||
document.redraw();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -127,6 +127,9 @@ var PaperScript = new function() {
|
|||
}
|
||||
});
|
||||
}
|
||||
// Automatically redraw document at the end.
|
||||
if (paper.document)
|
||||
paper.document.redraw();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue