private void handleMouseDrag(final Event event) {
            int size;
            if (reverse) {
                size = getTargetPosition() + getTargetSize() - getEventPosition(event) - offset;
            } else {
                size = getEventPosition(event) - getTargetPosition() - offset;
            }

            int clientSize = 0;
            final int min = 0;
            int max = -min;
            if (vertical) {
                clientSize = getElement().getParentElement().getParentElement().getOffsetHeight();
                max += clientSize - getOffsetHeight();
            } else {
                clientSize = getElement().getParentElement().getParentElement().getOffsetWidth();
                max += clientSize - getOffsetWidth();
            }
            if (size > max) {
                size = max;
            } else if (size < min) {
                size = min;
            }

            // TODO: 06/06/2023 This only works with 1-2 vertical splitters or 1 horizontal one
            //  Currently don't have any screens with more than that so can cross that road when
            //  we come to it.
            boolean allowResize = true;
            if (vertical) {
                // Splitter moving up/down
                if (vSplits != null && vSplits.length > index) {
                    final double currVSplit = vSplits[index];
                    double newVSplit = (double) size / (double) clientSize;

                    if (newVSplit > currVSplit && index == vSplits.length - 1) {
                        // bottom splitter moving up

                        // Not the first split (from top) so need to make sure our split does
                        // not move above the split above us.
                        double adjacentSplitTotal = 0;
                        for (int i = 0; i < index; i++) {
                            adjacentSplitTotal += vSplits[i];
                        }
                        final double maxVSplit = (1 - adjacentSplitTotal - 0.04);
                        if (newVSplit > maxVSplit) {
                            newVSplit = maxVSplit;
                            // Reach the max for this split so don't resize anymore
                            allowResize = false;
                        }
                    } else if (newVSplit > currVSplit && index == 0){
                        // Top split moving down

                        // Not the last split (from top) so need to make sure our split does not
                        // move below the split below us
                        double adjacentSplitTotal = 0;
                        for (int i = index + 1; i < vSplits.length; i++) {
                            adjacentSplitTotal += vSplits[i];
                        }
                        final double maxVSplit = 1 - adjacentSplitTotal - 0.04;
                        if (newVSplit > maxVSplit) {
                            newVSplit = maxVSplit;
                            allowResize = false;
                        }
                    }
                    vSplits[index] = newVSplit;
                }
            } else {
                // Splitter moving left/right
                if (hSplits != null && hSplits.length > index) {
                    hSplits[index] = (double) size / (double) clientSize;
                }
            }

            if (allowResize) {
                setAssociatedWidgetSize(size);
            }
            event.preventDefault();
        }
Sets the minimum allowable size for the given widget.
<p>
<p>
Its associated splitter cannot be dragged to a position that would make
it smaller than this size. This method has no effect for the
{@link DockLayoutPanel.Direction#CENTER} widget.
</p>

@param child   the child whose minimum size will be set
@param minSize the minimum size for this widget
stroom-core-client-widget/src/main/java/com/google/gwt/user/client/ui/MySplitLayoutPanel.java