chore(core): rename pointerRadius prop to interactionWidth
This commit is contained in:
@@ -19,7 +19,7 @@ const BaseEdge: FunctionalComponent<BaseEdgeProps> = function ({
|
||||
markerStart,
|
||||
markerEnd,
|
||||
style,
|
||||
pointerRadius = 2,
|
||||
interactionWidth = 20,
|
||||
}) {
|
||||
return [
|
||||
h('path', {
|
||||
@@ -29,13 +29,12 @@ const BaseEdge: FunctionalComponent<BaseEdgeProps> = function ({
|
||||
'marker-end': markerEnd,
|
||||
'marker-start': markerStart,
|
||||
}),
|
||||
pointerRadius
|
||||
interactionWidth
|
||||
? h('path', {
|
||||
'style': 'opacity: 0',
|
||||
'd': path,
|
||||
'class': 'vue-flow__edge-pointer',
|
||||
'stroke': 'transparent',
|
||||
'stroke-width': pointerRadius,
|
||||
'fill': 'none',
|
||||
'stroke-opacity': 0,
|
||||
'stroke-width': interactionWidth,
|
||||
})
|
||||
: null,
|
||||
label
|
||||
@@ -66,7 +65,7 @@ BaseEdge.props = [
|
||||
'markerStart',
|
||||
'markerEnd',
|
||||
'style',
|
||||
'pointerRadius',
|
||||
'interactionWidth',
|
||||
]
|
||||
BaseEdge.inheritAttrs = false
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const BezierEdge: FunctionalComponent<EdgeProps> = function ({
|
||||
markerEnd,
|
||||
markerStart,
|
||||
style,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
}) {
|
||||
const [path, labelX, labelY] = getBezierPath({
|
||||
sourceX,
|
||||
@@ -45,7 +45,7 @@ const BezierEdge: FunctionalComponent<EdgeProps> = function ({
|
||||
style,
|
||||
markerEnd,
|
||||
markerStart,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ BezierEdge.props = [
|
||||
'markerEnd',
|
||||
'markerStart',
|
||||
'style',
|
||||
'pointerRadius',
|
||||
'interactionWidth',
|
||||
]
|
||||
BezierEdge.inheritAttrs = false
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ const SimpleBezierEdge: FunctionalComponent<EdgeProps> = function ({
|
||||
markerEnd,
|
||||
markerStart,
|
||||
style,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
}) {
|
||||
const [path, labelX, labelY] = getSimpleBezierPath({
|
||||
sourceX,
|
||||
@@ -43,7 +43,7 @@ const SimpleBezierEdge: FunctionalComponent<EdgeProps> = function ({
|
||||
style,
|
||||
markerEnd,
|
||||
markerStart,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ SimpleBezierEdge.props = [
|
||||
'markerEnd',
|
||||
'markerStart',
|
||||
'style',
|
||||
'pointerRadius',
|
||||
'interactionWidth',
|
||||
]
|
||||
SimpleBezierEdge.inheritAttrs = false
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ const SmoothStepEdge: FunctionalComponent<SmoothStepEdgeProps> = function ({
|
||||
borderRadius,
|
||||
offset,
|
||||
style,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
}) {
|
||||
const [path, labelX, labelY] = getSmoothStepPath({
|
||||
sourceX,
|
||||
@@ -47,7 +47,7 @@ const SmoothStepEdge: FunctionalComponent<SmoothStepEdgeProps> = function ({
|
||||
style,
|
||||
markerEnd,
|
||||
markerStart,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ SmoothStepEdge.props = [
|
||||
'markerEnd',
|
||||
'markerStart',
|
||||
'style',
|
||||
'pointerRadius',
|
||||
'interactionWidth',
|
||||
]
|
||||
SmoothStepEdge.inheritAttrs = false
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ StepEdge.props = [
|
||||
'markerEnd',
|
||||
'markerStart',
|
||||
'style',
|
||||
'pointerRadius',
|
||||
'interactionWidth',
|
||||
]
|
||||
StepEdge.inheritAttrs = false
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ const StraightEdge: FunctionalComponent<EdgeProps> = function ({
|
||||
markerEnd,
|
||||
markerStart,
|
||||
style,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
}) {
|
||||
const [path, labelX, labelY] = getStraightPath({ sourceX, sourceY, targetX, targetY })
|
||||
|
||||
@@ -33,7 +33,7 @@ const StraightEdge: FunctionalComponent<EdgeProps> = function ({
|
||||
style,
|
||||
markerEnd,
|
||||
markerStart,
|
||||
pointerRadius,
|
||||
interactionWidth,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ StraightEdge.props = [
|
||||
'markerEnd',
|
||||
'markerStart',
|
||||
'style',
|
||||
'pointerRadius',
|
||||
'interactionWidth',
|
||||
]
|
||||
StraightEdge.inheritAttrs = false
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ const Wrapper = defineComponent({
|
||||
targetY,
|
||||
sourceHandleId: edge.sourceHandle,
|
||||
targetHandleId: edge.targetHandle,
|
||||
pointerRadius: edge.pointerRadius,
|
||||
interactionWidth: edge.interactionWidth,
|
||||
}),
|
||||
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user