mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-30 07:39:50 -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
src/core
|
@ -189,6 +189,12 @@ var PaperScript = this.PaperScript = new function() {
|
|||
}
|
||||
if (view) {
|
||||
view.setOnResize(onResize);
|
||||
// Fire resize event directly, so any user
|
||||
// defined resize handlers are called.
|
||||
view.fire('resize', {
|
||||
size: view.size,
|
||||
delta: new Point()
|
||||
});
|
||||
view.setOnFrame(onFrame);
|
||||
// Automatically draw view at the end.
|
||||
view.draw();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue