Support for relativeToWrapper and improved wrapper (#35295)

Wrapper option takes an HTMLElement as well as a string.
RelativeToWrapper was a recent addition to the library.
This commit is contained in:
Arsen 2019-05-13 19:05:52 -04:00 committed by Nathan Shively-Sanders
parent fadde892e8
commit a0efee5960

View File

@ -67,7 +67,11 @@ declare namespace Rellax {
/**
* By default, the position of parallax elements is determined via the scroll position of the body. Passing in the wrapper property will tell Rellax to watch that element instead
*/
wrapper?: string;
wrapper?: string | HTMLElement;
/**
* Do we want rellax element to be relative to the mentioned wrapper.
*/
relativeToWrapper?: boolean;
}
}