MCPcopy Create free account
hub / github.com/angular/components / withBoundaryElement

Method withBoundaryElement

src/cdk/drag-drop/drag-ref.ts:520–529  ·  view source on GitHub ↗

* Element to which the draggable's position will be constrained.

(boundaryElement: ElementRef<HTMLElement> | HTMLElement | null)

Source from the content-addressed store, hash-verified

518 * Element to which the draggable's position will be constrained.
519 */
520 withBoundaryElement(boundaryElement: ElementRef<HTMLElement> | HTMLElement | null): this {
521 this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;
522 this._resizeSubscription.unsubscribe();
523 if (boundaryElement) {
524 this._resizeSubscription = this._viewportRuler
525 .change(10)
526 .subscribe(() => this._containInsideBoundaryOnResize());
527 }
528 return this;
529 }
530
531 /** Sets the parent ref that the ref is nested in. */
532 withParent(parent: DragRef<unknown> | null): this {

Callers 1

_syncInputsMethod · 0.80

Calls 3

coerceElementFunction · 0.90
changeMethod · 0.80

Tested by

no test coverage detected