mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 22:29:11 -04:00
Add support for onResize handler.
This commit is contained in:
parent
3bd4db802c
commit
535e5fc5fc
2 changed files with 16 additions and 1 deletions
src/core
|
@ -141,7 +141,8 @@ var PaperScript = this.PaperScript = new function() {
|
|||
// Define variables for potential handlers, so eval() calls below to
|
||||
// fetch their values do not require try-catch around them.
|
||||
var onEditOptions, onSelect, onDeselect, onReselect, onMouseDown,
|
||||
onMouseUp, onMouseDrag, onMouseMove, onKeyDown, onKeyUp, onFrame;
|
||||
onMouseUp, onMouseDrag, onMouseMove, onKeyDown, onKeyUp,
|
||||
onFrame, onResize;
|
||||
var res = eval(compile(code));
|
||||
if (tool) {
|
||||
Base.each(['onEditOptions', 'onSelect', 'onDeselect',
|
||||
|
@ -153,6 +154,7 @@ var PaperScript = this.PaperScript = new function() {
|
|||
);
|
||||
}
|
||||
if (view) {
|
||||
view.onResize = onResize;
|
||||
if (onFrame) {
|
||||
view.setOnFrame(onFrame);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue