Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
I wanted to restrict the way draggable works on a Series. For a simple QML LineSeries like this:
LineSeries { width: 2 draggable: true pointDelegate: Rectangle { property int pointIndex width: 10; height: width color: pointIndex <= 0 || pointIndex >= 4 ? "transparent" : "blue" } XYPoint {x: 0; y: 0} // Do not make draggable XYPoint {x: 1; y: 1} // Only enable horizontal dragging XYPoint {x: 2; y: 0.5} // Only allow dragging in specific range XYPoint {x: 3; y: 0.5} XYPoint {x: 4; y: 0} // Do not make draggable }
I couldn't find a way to fulfill the requirements of the comments. It would be great to have more fine-grained control. For instance:
- Disable draggability on some points
- Restrict draggabillity to be inside a specified range or along horizontal/vertical lines. Perhaps providing a hook into the drag event and letting the user handle it optionally would resolve this.