Here's the screenshot
I’ve been dealing with this problem and tried to modify the Y position without any luck. Notice that Meli Job B seems to be misaligned. This only happens if the parent box is attached to multiple parents. I tried the code below to know if a box have multiple parents but I can’t work on how I will position the Y-axis as they all fall in the same place.
Code:
var pos = node.getPos();
var parents = node.getParents();
if(parents.length > 1) {
var subnodes = node.getSubnodes();
for(var i=0; i<subnodes.length; i++) {
var yPos = subnodes[i].getPos();
yPos.y = pos.y;
}
}
Thanks in advance for help.
var pos = node.getPos();
var parents = node.getParents();
var subnodes = node.getSubnodes();
for(var i=0; i<subnodes.length; i++)
{
var yPos = subnodes[i].getPos();
if(parents.length > 1)
yPos.y = pos.y;
else
yPos.y = 0
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With