Just use layer.position to (re-)position all stars.

This commit is contained in:
Jürg Lehni 2011-05-18 21:32:34 +01:00
parent ac213e94b4
commit e49b02b8c1

View file

@ -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>