mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-16 07:30:35 -04:00
Fire resize event directly after evaluation, so we don't need to call onResize ourselves from PaperScript.
This commit is contained in:
parent
2b5cfa401a
commit
d631288dc7
5 changed files with 6 additions and 9 deletions
examples/Scripts
|
@ -21,7 +21,6 @@
|
|||
// Fit the red path, so it fits inside the view:
|
||||
redPath.fitBounds(view.bounds);
|
||||
}
|
||||
onResize();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
handleTexts.push(handleOutText);
|
||||
}
|
||||
|
||||
// Call onResize directly on execution to correctly position everything
|
||||
onResize();
|
||||
|
||||
function onResize() {
|
||||
var width = view.size.width;
|
||||
var offset = width / 30;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue