MCPcopy
hub / github.com/stutrek/scrollmonitor / update

Method update

src/watcher.ts:251–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249 }
250 }
251 update() {
252 this.isAboveViewport = this.top < this.container.viewportTop;
253 this.isBelowViewport = this.bottom > this.container.viewportBottom;
254
255 this.isInViewport =
256 this.top < this.container.viewportBottom && this.bottom > this.container.viewportTop;
257 this.isFullyInViewport =
258 (this.top >= this.container.viewportTop &&
259 this.bottom <= this.container.viewportBottom) ||
260 (this.isAboveViewport && this.isBelowViewport);
261 }
262 destroy() {
263 var index = this.container.watchers.indexOf(this),
264 self = this;

Callers 3

constructorMethod · 0.95
constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected