Copilot commented on code in PR #4015:
URL:
https://github.com/apache/incubator-kie-tools/pull/4015#discussion_r4046594711
##########
packages/bpmn-editor/src/diagram/edges/Edges.tsx:
##########
@@ -143,8 +323,14 @@ export const SequenceFlowEdge = React.memo((props:
RF.EdgeProps<BpmnDiagramEdgeD
(!!props.data.bpmnElement["@_name"] || isEditingLabel) && (
<RF.EdgeLabelRenderer>
<div
+ ref={labelRef}
style={labelStyle}
- className={`kie-bpmn-editor--floating-edge-label
edge-label-renderer__custom-edge nodrag nopan ${props.selected ? "selected" :
""}`}
+ className={`kie-bpmn-editor--floating-edge-label
edge-label-renderer__custom-edge nodrag nopan ${props.selected ? "selected" :
""} ${labelCenter ? "pinned" : ""} ${isReadOnly ? "" : "movable"}
${isDraggingLabel ? "dragging" : ""}`}
+ onPointerDown={isReadOnly ? undefined : onLabelPointerDown}
Review Comment:
In read-only mode this removes the `movable` class, which is also the only
rule that restores `pointer-events` for the label renderer. As a result, a
read-only label cannot receive a press and therefore cannot select its Sequence
Flow, despite the stated behavior that pressing a label selects the flow.
Please keep labels pointer-interactive in read-only mode while gating only the
drag behavior (for example, separate selectable and movable classes/handlers).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]