MohammadMu99 commented on code in PR #4015:
URL: 
https://github.com/apache/incubator-kie-tools/pull/4015#discussion_r4047262913


##########
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:
   Thanks! In read-only mode the label keeps its behavior from before this PR: 
React Flow sets `pointer-events: none` on edge labels and the BPMN Editor never 
re-enabled them, so labels never received presses before. This PR only enables 
pointer events when the label can be moved. Also, read-only can't be switched 
on in the BPMN Editor yet (`settings.isReadOnly` is always `false`), so this 
case can't happen today. Making read-only labels clickable fits better in a 
separate change that wires read-only.



-- 
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]

Reply via email to