                 if (parentH > 0 && constraintsHolder["verticalCenter"] !== undefined)
                 {
                     // Layout uses verticalCenter to calculate position this way
-                    // location.y = parentH / 2 - size.y / 2 + verticalCenter
-                    constraintsHolder["verticalCenter"] = location.y + size.y / 2 - parentH / 2;
+                    // targetY = parentH / 2 - targetH / 2 + verticalCenter
+                    constraintsHolder["verticalCenter"] = targetY + targetH / 2 - parentH / 2;
                 }
 
                 // TODO EGeorgie: add support for 'baseline' constraint, when the new layouts support it.

        {
            if (adjustConstraints)
            {
                var layoutItem:ILayoutItem = LayoutItemFactory.getLayoutItemFor(target);
                var location:Point = layoutItem.actualPosition;
                var size:Point = layoutItem.actualSize;
                var parentW:int = 0;
                var parentH:int = 0;
                
                // For 'bottom' or 'verticalCenter' we need the parent height
                if (constraintsHolder["bottom"] !== undefined ||

                }

                if (constraintsHolder["left"] !== undefined)
                    constraintsHolder["left"] = Math.round(targetX);
                if (constraintsHolder["top"] !== undefined)
                    constraintsHolder["top"] = Math.round(targetY);

                // Only bother adjusting 'right' if our target is
                // parented to an object with a positive width
                if (parentW > 0 && constraintsHolder["right"] !== undefined)
                    constraintsHolder["right"] = parentW - targetX - targetW;

                // Only bother adjusting 'bottom' if our target is
                // parented to an object with a positive height
                if (parentH > 0 && constraintsHolder["bottom"] !== undefined)
                    constraintsHolder["bottom"] = parentH - targetY - targetH;

                // Only bother adjusting 'horizontalCenter' if our target is
                // parented to an object with a positive width
                if (parentW > 0 && constraintsHolder["horizontalCenter"] !== undefined)
                {
                    // Layout uses horizontalCenter to calculate position this way
                    // targetX = parentW / 2 - targetW / 2 + horizontalCenter
                    constraintsHolder["horizontalCenter"] = targetX + targetW / 2 - parentW / 2;
                }

                // Only bother adjusting 'verticalCenter' if our target is
