Bug Fixed : attaching to phases with maxPhases on its parent

This commit is contained in:
Luis Fernando Molina committed 2019-05-29 13:33:13 +02:00
1 parent f26d6b3c24
commit 0f605364da
1 file changed
+7
+7
View File
@@ -287,6 +287,13 @@ function newStrategyPart () {
}
}
}
if (thisObject.payload.node.type === 'Phase' && nearbyNode.type === 'Phase') {
if (nearbyNode.payload.parentNode.maxPhases !== undefined) {
if (nearbyNode.payload.parentNode.phases.length >= nearbyNode.payload.parentNode.maxPhases) {
continue
}
}
}
if (foundCompatible === false) {
if (distance < thisObject.container.frame.radius * 1.5 + floatingObject.container.frame.radius * 1.5) {
nearbyNode.payload.uiObject.getReadyToAttach()