Single axis dragging

I use the following code to enable dragging:

void mouseDrag(const juce::MouseEvent& event) override {
	juce::DragAndDropContainer* dragC = juce::DragAndDropContainer::findParentDragContainerFor(this);
	if (!dragC->isDragAndDropActive()) {
		dragC->startDragging("description string", this);
	}
}

and I derive from DragAndDropTarget on the target component.

So far everything works great. However, I was wondering if it’s possible to allow dragging on only one axis (for example on y-axis).

Previous thread here

I ended up doing a kludge to make it work – but it would be great to have this functionality in JUCE.

Rail