-More null checks for alternative interfaces

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2037 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jacob Brookover 2011-07-07 17:36:58 +00:00
parent f85d4b9e88
commit 364b0a61ae
1 changed files with 7 additions and 2 deletions

View File

@ -3279,8 +3279,13 @@
(function() {
workarea.scroll(function() {
$('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft;
$('#ruler_y')[0].scrollTop = workarea[0].scrollTop;
// TODO: jQuery's scrollLeft/Top() wouldn't require a null check
if ($('#ruler_x').length != 0) {
$('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft;
}
if ($('#ruler_y').length != 0) {
$('#ruler_y')[0].scrollTop = workarea[0].scrollTop;
}
});
}());