Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 22, 2018

Adds the cdkDragBoundary input that allows for people to constrain the dragging of an element to another element.

Fixes #14211.

@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Nov 22, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 22, 2018
@crisbeto crisbeto changed the title feat(drag-drop): add the ability to constrain to an element feat(drag-drop): add the ability to constrain dragging to an element Nov 22, 2018
@crisbeto crisbeto force-pushed the 14211/drag-drop-boundry branch from 8aa7719 to aa7b826 Compare November 22, 2018 22:48
* 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;
Copy link
Member

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

Copy link
Member Author

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.

@ngbot
Copy link

ngbot bot commented Nov 28, 2018

Hi @crisbeto! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

expect(fixture.componentInstance.endedSpy).toHaveBeenCalledTimes(1);
}));

it('should allow for dragging to be constrained to an elemnet', fakeAsync(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elemnet -> element

@crisbeto crisbeto force-pushed the 14211/drag-drop-boundry branch from 40d2540 to e976add Compare November 30, 2018 20:19
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Nov 30, 2018
Adds the `cdkDragBoundary` input that allows for people to constrain the dragging of an element to another element.

Fixes angular#14211.
@crisbeto crisbeto force-pushed the 14211/drag-drop-boundry branch from e976add to 6574c2f Compare November 30, 2018 20:36
@mmalerba mmalerba merged commit 8432e80 into angular:master Dec 3, 2018
josephperrott pushed a commit to josephperrott/components that referenced this pull request Jan 14, 2019
…ngular#14242)

Adds the `cdkDragBoundary` input that allows for people to constrain the dragging of an element to another element.

Fixes angular#14211.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DragDropModule : Limit the draggable element stay in the bounds (of a container)

5 participants