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).