Selection bounds of custom component

Hi all,

We have developed some custom nodes that override the layouts of the component. We have a UI button that changes the size. After this we updated LayoutBounds, LayoutInputParams and LayoutOutputParams.

Everything works fine BUT we can’t select the node if we click on the input or output description names.
image

My diagram shows where you can and cant select the component.

        protected override void Layout()
        {
            Bounds = RectangleF.Empty;
            base.Layout();
            RectangleF bounds = Bounds;
            double left = (double)bounds.Left;
            bounds = Bounds;
            double bottom = (double)bounds.Bottom;
            bounds = Bounds;
            var measureString = TextRenderer.MeasureText(ButtonText, GH_FontServer.StandardBold);
            double width = measureString.Width;
            double buttonLeft = left + (bounds.Width - width) / 2;
            TextArea = ButtonArea = new RectangleF((float)buttonLeft, (float)bottom, (float)width, 20f);
            Bounds = RectangleF.Union(Bounds, ButtonArea);

            m_innerBounds = LayoutComponentBox(Owner);
            LayoutInputParams(Owner, m_innerBounds);
            LayoutOutputParams(Owner, m_innerBounds);
            var iconPlusParamsBounds = LayoutBounds(Owner, m_innerBounds);

            //If button is still wider than the centre icon + input output names, they need to be moved outward
            if (iconPlusParamsBounds.Width < ButtonArea.Width)
            {
                var innerBoundsWithButton = CalculateComponentBoxWithButton();
                LayoutInputParams(Owner, innerBoundsWithButton);
                LayoutOutputParams(Owner, innerBoundsWithButton);
            }
        }

        private RectangleF CalculateComponentBoxWithButton()
        {
            RectangleF baseBox = LayoutComponentBox(Owner);
            var buttonBox = ButtonArea;
            float reductionAmount = 38;
            buttonBox.Width -= reductionAmount; 
            buttonBox.X += reductionAmount / 2;

            RectangleF updatedBox = RectangleF.Union(baseBox, buttonBox);
            updatedBox = new RectangleF(updatedBox.X, baseBox.Y, updatedBox.Width, baseBox.Height);

            return updatedBox;
        }

Thanks in advance!