Fix for getScroll

master
Dmitry Baranovskiy 2014-05-27 06:57:03 -07:00
parent 499193a51f
commit 5850f162d9
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

4
dist/snap.svg.js vendored
View File

@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// build: 2014-05-23
// build: 2014-05-27
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@ -6855,7 +6855,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
},
getScroll = function (xy, el) {
var name = xy == "y" ? "scrollTop" : "scrollLeft",
doc = el.node.ownerDocument;
doc = el && el.node ? el.node.ownerDocument : glob.doc;
return doc[name in doc.documentElement ? "documentElement" : "body"][name];
},
preventDefault = function () {

View File

@ -27,7 +27,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
},
getScroll = function (xy, el) {
var name = xy == "y" ? "scrollTop" : "scrollLeft",
doc = el.node.ownerDocument;
doc = el && el.node ? el.node.ownerDocument : glob.doc;
return doc[name in doc.documentElement ? "documentElement" : "body"][name];
},
preventDefault = function () {