mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Just use layer.position to (re-)position all stars.
This commit is contained in:
parent
ac213e94b4
commit
e49b02b8c1
1 changed files with 3 additions and 3 deletions
|
@ -28,10 +28,10 @@
|
|||
}
|
||||
path.smooth();
|
||||
var placedSymbol = new PlacedSymbol(path);
|
||||
placedSymbol.position = view.center;
|
||||
layer.appendBottom(placedSymbol);
|
||||
}
|
||||
|
||||
layer.position = view.center;
|
||||
|
||||
function onFrame(event) {
|
||||
for (var i = 0, l = layer.children.length; i < l; i++) {
|
||||
var item = layer.children[i];
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
// Reposition the paths whenever the window is resized:
|
||||
function onResize(event) {
|
||||
project.activeLayer.position = view.center;
|
||||
layer.position = view.center;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue