mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Update getView to handle DOM elements without getAttribute, e.g. SVGDocument
This commit is contained in:
parent
6c9c16ad3d
commit
0df86550e6
1 changed files with 3 additions and 0 deletions
|
@ -530,6 +530,9 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{
|
|||
|
||||
function getView(event) {
|
||||
// Get the view from the current event target.
|
||||
var target = DomEvent.getTarget(event);
|
||||
if (target.getAttribute === undefined)
|
||||
return false;
|
||||
return View._viewsById[DomEvent.getTarget(event).getAttribute('id')];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue