mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix bug in Raster.onLoad()
It was executing in wrong scope on websites with multiple scopes.
This commit is contained in:
parent
160fe25cd1
commit
c579433b3d
1 changed files with 5 additions and 2 deletions
|
@ -297,9 +297,12 @@ var Raster = Item.extend(/** @lends Raster# */{
|
|||
image = document.getElementById(src) || new Image();
|
||||
|
||||
function loaded() {
|
||||
var view = that._project.view;
|
||||
if (view)
|
||||
paper = view._scope;
|
||||
that.fire('load');
|
||||
if (that._project.view)
|
||||
that._project.view.draw(true);
|
||||
if (view)
|
||||
view.draw(true);
|
||||
}
|
||||
|
||||
// IE has naturalWidth / Height defined, but width / height set to 0
|
||||
|
|
Loading…
Reference in a new issue