fix: Marker arrowheads not displayed
This commit is contained in:
@@ -1,22 +1,30 @@
|
|||||||
import { FunctionalComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
interface MarkerProps {
|
interface MarkerProps {
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ((props: MarkerProps, { slots }) => {
|
export default defineComponent({
|
||||||
return () => (
|
props: {
|
||||||
<marker
|
id: {
|
||||||
id={props.id}
|
type: String,
|
||||||
class="revue-flow__arrowhead"
|
required: true
|
||||||
markerWidth="12.5"
|
}
|
||||||
markerHeight="12.5"
|
},
|
||||||
viewBox="-10 -10 20 20"
|
setup(props: MarkerProps, { slots }) {
|
||||||
orient="auto"
|
return () => (
|
||||||
refX="0"
|
<marker
|
||||||
refY="0"
|
id={props.id}
|
||||||
>
|
class="revue-flow__arrowhead"
|
||||||
{slots.default ? slots.default() : ''}
|
markerWidth="12.5"
|
||||||
</marker>
|
markerHeight="12.5"
|
||||||
);
|
viewBox="-10 -10 20 20"
|
||||||
}) as FunctionalComponent<MarkerProps>;
|
orient="auto"
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
>
|
||||||
|
{slots.default ? slots.default() : ''}
|
||||||
|
</marker>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user