Skip to content

Latest commit

 

History

History
216 lines (211 loc) · 8.82 KB

ConstantsAbout.md

File metadata and controls

216 lines (211 loc) · 8.82 KB

Internal Constants

In this section you will find all the internal constants used by this API: they are private and they're declared with the keywork const therefore they can't be overwritten.
They are used by the uss object for initialization and reset purposes, but they are also mentioned in other sections of the documentation so may find this helpful.


Name Type Description
INITIAL_WINDOW_WIDTH Number The Window's inner width (in px) when the page is first loaded.
INITIAL_WINDOW_HEIGHT Number The Window's inner height (in px) when the page is first loaded.
DEFAULT_XSTEP_LENGTH Number The initial value of the _xStepLength property: it represents the default number of pixels scrolled in a single scroll-animation's step on the x-axis.
It's 16px at 412px of (initial Window's) width and 23px at 1920px of (initial Window's) width.
DEFAULT_YSTEP_LENGTH Number The initial value of the _yStepLength property: it represents the default number of pixels scrolled in a single scroll-animation's step on the y-axis.
It's 38px at 789px of (initial Window's) height and 22px at 1920px of (initial Window's) height.
DEFAULT_MIN_ANIMATION_FRAMES Number The initial value of the _minAnimationFrame property: it represents the default lowest number of frames any scroll-animation on a container should last if no stepLengthCalculator is set for it.
It's 51 frames at 929px of (initial Window's) height.
DEFAULT_FRAME_TIME Number The initial value of the _framesTime property: it's 16.6ms and it initially assumes that the user's browser/screen is refreshing at 60fps.
DEFAULT_REGEX_LOGGER_DISABLED RegExp The regular expression used by the default loggers to test if they're disabled.
DEFAULT_REGEX_LOGGER_LEGACY RegExp The regular expression used by the default loggers to test if they should operate in legacy mode.
DEFAULT_REGEX_ALIGNMENT_NEAREST RegExp The regular expression used by scrollIntoView to test if the passed alignments correspond to nearest.
DEFAULT_REGEX_OVERFLOW RegExp The regular expression used to test if any container has any of the overflow properties set to auto or scroll.
DEFAULT_REGEX_OVERFLOW_HIDDEN RegExp The regular expression used to test if any container has any of the overflow properties set to auto, scroll or hidden.
DEFAULT_REGEX_OVERFLOW_WITH_VISIBLE RegExp The regular expression used to test if any container has any of the overflow properties set to auto, scroll or visible.
DEFAULT_REGEX_OVERFLOW_HIDDEN_WITH_VISIBLE RegExp The regular expression used to test if any container has any of the overflow properties set to auto, scroll, hidden or visible.
DEFAULT_XSTEP_LENGTH_CALCULATOR Function The default stepLengthCalculator for scroll-animations on the x-axis of every container that doesn't have a custom stepLengthCalculator set.
Controls how long each animation-step on the x-axis must be (in px) in order to target the _minAnimationFrame property value.
DEFAULT_YSTEP_LENGTH_CALCULATOR Function The default stepLengthCalculator for scroll-animations on the y-axis of every container that doesn't have a custom stepLengthCalculator set.
Controls how long each animation-step on the y-axis must be (in px) in order to target the _minAnimationFrame property value.
DEFAULT_ERROR_LOGGER Function The initial value of the _errorLogger property: it logs the API error messages inside the browser's console.
DEFAULT_WARNING_LOGGER Function The initial value of the _warningLogger property: it logs the API warning messages inside the browser's console.