-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(drag-drop): add the ability to constrain dragging to an element #14242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8aa7719
to
aa7b826
Compare
src/cdk/drag-drop/drag.ts
Outdated
* be constrained. Matching starts from the element's parent and goes up the DOM until a matching | ||
* element has been found. | ||
*/ | ||
@Input('cdkDragBoundry') boundryElementSelector: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really called boundry
? Please correct me if I'am wrong, but I thought it's boundary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's boundary, good catch.
3900385
to
40d2540
Compare
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/cdk/drag-drop/drag.spec.ts
Outdated
@@ -545,6 +546,17 @@ describe('CdkDrag', () => { | |||
expect(fixture.componentInstance.endedSpy).toHaveBeenCalledTimes(1); | |||
})); | |||
|
|||
it('should allow for dragging to be constrained to an elemnet', fakeAsync(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elemnet -> element
40d2540
to
e976add
Compare
Adds the `cdkDragBoundary` input that allows for people to constrain the dragging of an element to another element. Fixes angular#14211.
e976add
to
6574c2f
Compare
…ngular#14242) Adds the `cdkDragBoundary` input that allows for people to constrain the dragging of an element to another element. Fixes angular#14211.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
cdkDragBoundary
input that allows for people to constrain the dragging of an element to another element.Fixes #14211.