mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Remove unneeded parameter from cumulateOffset().
This commit is contained in:
parent
dd37e22c86
commit
a454bbe187
1 changed files with 2 additions and 3 deletions
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
var DomElement = new function() {
|
||||
function cumulateOffset(el, name, parent, positioned, scroll, test) {
|
||||
function cumulateOffset(el, name, parent, test) {
|
||||
var left = name + 'Left',
|
||||
top = name + 'Top',
|
||||
x = 0,
|
||||
|
@ -37,7 +37,7 @@ var DomElement = new function() {
|
|||
}
|
||||
|
||||
function getScrollOffset(el, test) {
|
||||
return cumulateOffset(el, 'scroll', 'parentNode', null, null, test).offset;
|
||||
return cumulateOffset(el, 'scroll', 'parentNode', test).offset;
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -55,7 +55,6 @@ var DomElement = new function() {
|
|||
|
||||
getOffset: function(el, positioned, scroll) {
|
||||
var res = cumulateOffset(el, 'offset', 'offsetParent',
|
||||
positioned, scroll,
|
||||
positioned ? /^(relative|absolute|fixed)$/ : /^fixed$/);
|
||||
// We need to handle fixed positioned elements seperately if we're
|
||||
// asked to calculate offsets without scrolling removed, by adding
|
||||
|
|
Loading…
Reference in a new issue