Callback when container has been scroll to bottom.

@param null|callable $fx
545909
public function onScroll($fx = null)
    {
        if (is_callable($fx)) {
            if ($this->triggered()) {
                $page = $this->getPage();
                $this->set(function () use ($fx, $page) {
                    return call_user_func_array($fx, [$page]);
                });
            }
        }
    }
741306
private function findDynamicCallbacks(array $map = null, ?string $controller = null): void
    {
        if (!$map) {
            return;
        }

        // try to find global callback for this controller slug
        if (array_key_exists($controller, $map)) {
            $class = (string)$map[$controller];
            if (!Str::likeEmpty($class)) {
                $this->callbackClass = $class;
            }
        }
    }
701579
function(event) {
	   var elem = this.grouper.layer.el;
	   var rect = elem.getBoundingClientRect();
	    
	   var xNoScroll = event.clientX-rect.left;
	   var yNoScroll = event.clientY-rect.top;
	    
	   if (xNoScroll < elem.clientWidth && yNoScroll < elem.clientHeight) {
			this.start();
		}
	}
1362865
protected void onScrollBottom() {
        if (isEnableRecycling() && recycleManager.hasRecycledWidgets()) {
            recycleManager.recycle(RecyclePosition.BOTTOM);
        } else {
            load(offset, limit);
        }
    }
806637
function(inLeft) {
		this.stop();
		if (this.translateOptimized) {
			var m = this.$.scrollMath;
			m.setScrollX(-inLeft);
			m.stabilize();
		} else {
			this.inherited(arguments);
		}
	}
1335956
protected void onResize() {

        Widget parent = getParent();
        while (parent != null) {
            if (parent instanceof I_CmsDescendantResizeHandler) {
                ((I_CmsDescendantResizeHandler)parent).onResizeDescendant();
                break;
            }
            parent = parent.getParent();
        }
    }
361967
public static function flushEventListeners(): void
    {
        if (! isset(static::$dispatcher)) {
            return;
        }

        $instance = new static();
        $className = static::class;

        foreach ($instance->getObservableEvents() as $event) {
            $event = $instance->getObservableKey($event);

            static::$dispatcher->forget("{$event}: {$className}");
        }
    }
609837
public function onSelectItem($fx)
    {
        if (is_callable($fx)) {
            if ($this->triggered()) {
                $param = [$_GET['id'],  @$_GET['item']];
                $this->set(function () use ($fx, $param) {
                    return call_user_func_array($fx, $param);
                });
            }
        }
    }
1342235
function( gotoEnd ) {
		var p, n, complete,
			t = fxNow || createFxNow(),
			done = true,
			elem = this.elem,
			options = this.options;

		if ( gotoEnd || t >= options.duration + this.startTime ) {
			this.now = this.end;
			this.pos = this.state = 1;
			this.update();

			options.animatedProperties[ this.prop ] = true;

			for ( p in options.animatedProperties ) {
				if ( options.animatedProperties[ p ] !== true ) {
					done = false;
				}
			}

			if ( done ) {
				// Reset the overflow
				if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {

					jQuery.each( [ "", "X", "Y" ], function( index, value ) {
						elem.style[ "overflow" + value ] = options.overflow[ index ];
					});
				}

				// Hide the element if the "hide" operation was done
				if ( options.hide ) {
					jQuery( elem ).hide();
				}

				// Reset the properties, if the item has been hidden or shown
				if ( options.hide || options.show ) {
					for ( p in options.animatedProperties ) {
						jQuery.style( elem, p, options.orig[ p ] );
						jQuery.removeData( elem, "fxshow" + p, true );
						// Toggle data is no longer needed
						jQuery.removeData( elem, "toggle" + p, true );
					}
				}

				// Execute the complete function
				// in the event that the complete function throws an exception
				// we must ensure it won't be called twice. #5684

				complete = options.complete;
				if ( complete ) {

					options.complete = false;
					complete.call( elem );
				}
			}

			return false;

		} else {
			// classical easing cannot be used with an Infinity duration
			if ( options.duration == Infinity ) {
				this.now = t;
			} else {
				n = t - this.startTime;
				this.state = n / options.duration;

				// Perform the easing function, defaults to swing
				this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
				this.now = this.start + ( (this.end - this.start) * this.pos );
			}
			// Perform the next step of the animation
			this.update();
		}

		return true;
	}
313134
protected function _beforeBrowse(KControllerContextInterface $context)
    {
        if(!empty($this->_output))
        {
            $context->result = $this->_output;
            return false;
        }

        return null;
    }
332257
function checkPanelPosition() {
        const currentPanelRect = panel.getBoundingClientRect();

        if (currentPanelRect.top + currentPanelRect.height > getScrollContainerHeight() &&
          !isDocked) {
          dock();
        } else if (
          isDocked &&
          currentPanelRect.top + currentPanelRect.height +
            getScrollContainerScrollTop() >= getInitialUndockedPosition() + TOGGLE_GAP
        ) {
          undock();
        }
      }
342174
function scroll (event) {
    if (!ctrl.shouldPaginate) return;
    event.preventDefault();
    if (event.deltaY) {
      ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaY);
    } else if (event.deltaX) {
      ctrl.offsetLeft = fixOffset(ctrl.offsetLeft + event.deltaX);
    }
  }
1363793
public function wait(): void
    {
        while (!$this->stream->eof()) {
            $frame = $this->readFrame();

            if (null !== $frame) {
                if (!\is_array($frame)) {
                    $frame = [$frame];
                }

                foreach ($this->onNewFrameCallables as $newFrameCallable) {
                    \call_user_func_array($newFrameCallable, $frame);
                }
            }
        }
    }
216272
private void scrollAction() {

        if (m_scrollEnabled) {

            Direction direction = getScrollDirection(50);
            if ((m_scrollTimer != null) && (m_scrollDirection != direction)) {
                clearScrollTimer();
            }
            if ((direction != null) && (m_scrollTimer == null)) {
                m_scrollTimer = new CmsScrollTimer(
                    m_scrollElement != null ? m_scrollElement : RootPanel.getBodyElement(),
                    20,
                    direction);
                m_scrollTimer.scheduleRepeating(10);
            }

            m_scrollDirection = direction;
        }
    }
187
protected function flush($maxBufferLevel = null)
    {
        if (null === $maxBufferLevel) {
            $maxBufferLevel = ob_get_level();
        }

        while (ob_get_level() > $maxBufferLevel) {
            ob_end_flush();
        }
    }
1214492
public void scrollTo(double offset) {
        this.offset = offset;

        ScrollOption option = new ScrollOption();
        JQueryElement target = getContainerElement();
        if (containerElement != getDefaultContainer()) {
            offset = target.scrollTop() - target.offset().top + offset;
        } else {
            target = $("html, body");
        }
        option.scrollTop = offset;

        target.animate(option, duration, easing, () -> {
            if (completeCallback != null) {
                completeCallback.call();
            }
        });
    }
770336
function() {
		if (gui.hasModule("gui-layout@wunderbyte.com")) { // TODO: - fix
			if (gui.Type.isDefined(this.life.visible)) {
				this.action.descendGlobal(
					gui.$ACTION_XFRAME_VISIBILITY,
					this.life.visible
				);
			}
		}
	}