chore: disable inheriting attrs

This commit is contained in:
Braks
2022-04-21 19:57:55 +02:00
parent 21570209d8
commit cd85eb1842
11 changed files with 28 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ const bb = computed(() => {
return getRectOfNodes(store.getNodes)
})
const viewBB = controlledComputed(bb, () => ({
const viewBB = computed(() => ({
x: -store.viewport.x / store.viewport.zoom,
y: -store.viewport.y / store.viewport.zoom,
width: store.dimensions.width / store.viewport.zoom,
@@ -92,7 +92,7 @@ export default {
<svg
:width="elementWidth"
:height="elementHeight"
:viewBox="[viewBox.x, viewBox.y, viewBox.width, viewBox.height].join(',')"
:viewBox="[viewBox.x, viewBox.y, viewBox.width, viewBox.height].join(' ')"
class="vue-flow__minimap"
>
<MiniMapNode

View File

@@ -53,4 +53,20 @@ const BaseEdge: FunctionalComponent<Props> = function ({
]
}
BaseEdge.props = [
'path',
'centerX',
'centerY',
'label',
'labelBgBorderRadius',
'labelBgPadding',
'labelBgStyle',
'labelShowBg',
'labelStyle',
'markerStart',
'markerEnd',
'style',
]
BaseEdge.inheritAttrs = false
export default BaseEdge

View File

@@ -76,5 +76,6 @@ BezierEdge.props = [
'markerStart',
'style',
]
BezierEdge.inheritAttrs = false
export default BezierEdge

View File

@@ -42,4 +42,6 @@ const EdgeAnchor: FunctionalComponent<Props> = function ({ radius = 10, centerX
})
}
EdgeAnchor.props = ['radius', 'centerX', 'centerY', 'position']
export default EdgeAnchor

View File

@@ -72,5 +72,6 @@ SimpleBezierEdge.props = [
'markerStart',
'style',
]
SimpleBezierEdge.inheritAttrs = false
export default SimpleBezierEdge

View File

@@ -74,5 +74,6 @@ SmoothStepEdge.props = [
'markerStart',
'style',
]
SmoothStepEdge.inheritAttrs = false
export default SmoothStepEdge

View File

@@ -23,5 +23,6 @@ StepEdge.props = [
'markerStart',
'style',
]
StepEdge.inheritAttrs = false
export default StepEdge

View File

@@ -57,5 +57,6 @@ StraightEdge.props = [
'markerStart',
'style',
]
StraightEdge.inheritAttrs = false
export default StraightEdge

View File

@@ -18,5 +18,6 @@ const DefaultNode: FunctionalComponent<NodeProps> = function ({
}
DefaultNode.props = ['sourcePosition', 'targetPosition', 'label', 'isValidTargetPos', 'isValidSourcePos', 'connectable']
DefaultNode.inheritAttrs = false
export default DefaultNode

View File

@@ -15,5 +15,6 @@ const InputNode: FunctionalComponent<NodeProps> = function ({
}
InputNode.props = ['sourcePosition', 'label', 'isValidSourcePos', 'connectable']
InputNode.inheritAttrs = false
export default InputNode

View File

@@ -15,5 +15,6 @@ const OutputNode: FunctionalComponent<NodeProps> = function ({
}
OutputNode.props = ['targetPosition', 'label', 'isValidTargetPos', 'connectable']
OutputNode.inheritAttrs = false
export default OutputNode