MCPcopy Create free account
hub / github.com/microsoft/SandDance / AutoScroll1

Function AutoScroll1

docs/app/js/sanddance-app.js:21079–21090  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

21077 * {@docCategory AutoScroll}
21078 */ var AutoScroll = /** @class */ function() {
21079 function AutoScroll1(element) {
21080 this._events = new (0, _eventGroup.EventGroup)(this);
21081 this._scrollableParent = (0, _scroll.findScrollableParent)(element);
21082 this._incrementScroll = this._incrementScroll.bind(this);
21083 this._scrollRect = (0, _getRect.getRect)(this._scrollableParent);
21084 // eslint-disable-next-line @typescript-eslint/no-explicit-any
21085 if (this._scrollableParent === window) this._scrollableParent = document.body;
21086 if (this._scrollableParent) {
21087 this._events.on(window, "mousemove", this._onMouseMove, true);
21088 this._events.on(window, "touchmove", this._onTouchMove, true);
21089 }
21090 }
21091 AutoScroll1.prototype.dispose = function() {
21092 this._events.dispose();
21093 this._stopScroll();

Callers

nothing calls this directly

Calls 1

onMethod · 0.45

Tested by

no test coverage detected