Diffstat (limited to 'frontend/gamma/js/MochiKit/Position.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/MochiKit/Position.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/gamma/js/MochiKit/Position.js b/frontend/gamma/js/MochiKit/Position.js index 6bc5b39..2680507 100644 --- a/frontend/gamma/js/MochiKit/Position.js +++ b/frontend/gamma/js/MochiKit/Position.js | |||
@@ -1,59 +1,59 @@ | |||
1 | /*** | 1 | /*** |
2 | 2 | ||
3 | MochiKit.Position 1.5 | 3 | MochiKit.Position 1.5 |
4 | 4 | ||
5 | See <http://mochikit.com/> for documentation, downloads, license, etc. | 5 | See <http://mochikit.com/> for documentation, downloads, license, etc. |
6 | 6 | ||
7 | (c) 2005-2006 Bob Ippolito and others. All rights Reserved. | 7 | (c) 2005-2006 Bob Ippolito and others. All rights Reserved. |
8 | 8 | ||
9 | ***/ | 9 | ***/ |
10 | 10 | ||
11 | MochiKit.Base._module('Position', '1.5', ['Base', 'DOM', 'Style']); | 11 | MochiKit.Base.module(MochiKit, 'Position', '1.5', ['Base', 'DOM', 'Style']); |
12 | 12 | ||
13 | MochiKit.Base.update(MochiKit.Position, { | 13 | MochiKit.Base.update(MochiKit.Position, { |
14 | // Don't export from this module | 14 | // Don't export from this module |
15 | __export__: false, | 15 | __export__: false, |
16 | 16 | ||
17 | // set to true if needed, warning: firefox performance problems | 17 | // set to true if needed, warning: firefox performance problems |
18 | // NOT neeeded for page scrolling, only if draggable contained in | 18 | // NOT neeeded for page scrolling, only if draggable contained in |
19 | // scrollable elements | 19 | // scrollable elements |
20 | includeScrollOffsets: false, | 20 | includeScrollOffsets: false, |
21 | 21 | ||
22 | /** @id MochiKit.Position.prepare */ | 22 | /** @id MochiKit.Position.prepare */ |
23 | prepare: function () { | 23 | prepare: function () { |
24 | var deltaX = window.pageXOffset | 24 | var deltaX = window.pageXOffset |
25 | || document.documentElement.scrollLeft | 25 | || document.documentElement.scrollLeft |
26 | || document.body.scrollLeft | 26 | || document.body.scrollLeft |
27 | || 0; | 27 | || 0; |
28 | var deltaY = window.pageYOffset | 28 | var deltaY = window.pageYOffset |
29 | || document.documentElement.scrollTop | 29 | || document.documentElement.scrollTop |
30 | || document.body.scrollTop | 30 | || document.body.scrollTop |
31 | || 0; | 31 | || 0; |
32 | this.windowOffset = new MochiKit.Style.Coordinates(deltaX, deltaY); | 32 | this.windowOffset = new MochiKit.Style.Coordinates(deltaX, deltaY); |
33 | }, | 33 | }, |
34 | 34 | ||
35 | /** @id MochiKit.Position.cumulativeOffset */ | 35 | /** @id MochiKit.Position.cumulativeOffset */ |
36 | cumulativeOffset: function (element) { | 36 | cumulativeOffset: function (element) { |
37 | var valueT = 0; | 37 | var valueT = 0; |
38 | var valueL = 0; | 38 | var valueL = 0; |
39 | do { | 39 | do { |
40 | valueT += element.offsetTop || 0; | 40 | valueT += element.offsetTop || 0; |
41 | valueL += element.offsetLeft || 0; | 41 | valueL += element.offsetLeft || 0; |
42 | element = element.offsetParent; | 42 | element = element.offsetParent; |
43 | } while (element); | 43 | } while (element); |
44 | return new MochiKit.Style.Coordinates(valueL, valueT); | 44 | return new MochiKit.Style.Coordinates(valueL, valueT); |
45 | }, | 45 | }, |
46 | 46 | ||
47 | /** @id MochiKit.Position.realOffset */ | 47 | /** @id MochiKit.Position.realOffset */ |
48 | realOffset: function (element) { | 48 | realOffset: function (element) { |
49 | var valueT = 0; | 49 | var valueT = 0; |
50 | var valueL = 0; | 50 | var valueL = 0; |
51 | do { | 51 | do { |
52 | valueT += element.scrollTop || 0; | 52 | valueT += element.scrollTop || 0; |
53 | valueL += element.scrollLeft || 0; | 53 | valueL += element.scrollLeft || 0; |
54 | element = element.parentNode; | 54 | element = element.parentNode; |
55 | } while (element); | 55 | } while (element); |
56 | return new MochiKit.Style.Coordinates(valueL, valueT); | 56 | return new MochiKit.Style.Coordinates(valueL, valueT); |
57 | }, | 57 | }, |
58 | 58 | ||
59 | /** @id MochiKit.Position.within */ | 59 | /** @id MochiKit.Position.within */ |