mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Update docs and dist version to 0.2.
This commit is contained in:
parent
ea629fefda
commit
4fa6ffeb01
47 changed files with 4846 additions and 1903 deletions
3590
dist/docs/resources/js/paper.js
vendored
3590
dist/docs/resources/js/paper.js
vendored
File diff suppressed because one or more lines are too long
9
dist/docs/resources/js/reference.js
vendored
9
dist/docs/resources/js/reference.js
vendored
|
@ -119,10 +119,15 @@ PaperScript = HtmlElement.extend({
|
|||
var scope = paper.PaperScope.get(script.$);
|
||||
if (scope) {
|
||||
// Update script to edited version
|
||||
script.setText(editor.getValue());
|
||||
var code = editor.getValue();
|
||||
script.setText(code);
|
||||
// Keep a reference to the used canvas, since we're going to
|
||||
// fully clear the scope and initialize again with this canvas.
|
||||
var canvas = scope.view.canvas;
|
||||
// Clear scope first, then evaluate a new script.
|
||||
scope.clear();
|
||||
scope.evaluate(script.$);
|
||||
scope.initialize(canvas);
|
||||
scope.evaluate(code);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue