mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -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.activeLayer.appendBottom(path);
|
||||||
}
|
}
|
||||||
document.redraw();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
var path = new Path.Circle(center, i * 5);
|
var path = new Path.Circle(center, i * 5);
|
||||||
path.strokeColor = 'black';
|
path.strokeColor = 'black';
|
||||||
}
|
}
|
||||||
document.redraw();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
);
|
);
|
||||||
letterPath.closed = true;
|
letterPath.closed = true;
|
||||||
letterPath.fillColor = 'black';
|
letterPath.fillColor = 'black';
|
||||||
document.redraw();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
<script type="text/paperscript" canvas="canvas">
|
<script type="text/paperscript" canvas="canvas">
|
||||||
var path = new Path.Rectangle([50, 50], [100, 100]);
|
var path = new Path.Rectangle([50, 50], [100, 100]);
|
||||||
path.strokeColor = 'black';
|
path.strokeColor = 'black';
|
||||||
document.redraw();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
path.smooth();
|
path.smooth();
|
||||||
document.activeLayer.appendBottom(path);
|
document.activeLayer.appendBottom(path);
|
||||||
}
|
}
|
||||||
document.redraw();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
path.strokeJoin = 'miter';
|
path.strokeJoin = 'miter';
|
||||||
path.strokeCap = 'butt';
|
path.strokeCap = 'butt';
|
||||||
console.log(path.segments);
|
console.log(path.segments);
|
||||||
document.redraw();
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -127,6 +127,9 @@ var PaperScript = new function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// Automatically redraw document at the end.
|
||||||
|
if (paper.document)
|
||||||
|
paper.document.redraw();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue