Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
feat(page-elements can now not be dropped on there own children):
Browse files Browse the repository at this point in the history
  • Loading branch information
Lasse Küchler committed Dec 18, 2017
1 parent 12f64d5 commit 90d5841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/container/element_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class ElementList extends React.Component<ElementListProps> {
? new PageElement(this.props.store.getPattern(transferPatternPath), true)
: this.props.store.getRearrangeElement();

if (!parentElement || !pageElement) {
if (!parentElement || !pageElement || pageElement.isAncestorOf(parentElement)) {
return;
}

Expand All @@ -116,7 +116,7 @@ export class ElementList extends React.Component<ElementListProps> {
? new PageElement(this.props.store.getPattern(transferPatternPath), true)
: this.props.store.getRearrangeElement();

if (!pageElement) {
if (!pageElement || pageElement.isAncestorOf(element)) {
return;
}

Expand Down

0 comments on commit 90d5841

Please sign in to comment.