fix: cancel dragging on invalid position

This commit is contained in:
shuaige.zsg 2020-05-11 17:24:47 +08:00
parent ea62f12343
commit f961096542

View File

@ -99,7 +99,7 @@ export class Designer {
const { dragObject, copy } = e;
const loc = this._dropLocation;
if (loc) {
if (isLocationChildrenDetail(loc.detail)) {
if (isLocationChildrenDetail(loc.detail) && loc.detail.valid !== false) {
let nodes: Node[] | undefined;
if (isDragNodeObject(dragObject)) {
nodes = insertChildren(loc.target, dragObject.nodes, loc.detail.index, copy);