UNPKG

@rxflow/base

Version:

BaseFlow - 核心 Flow 组件库

48 lines (46 loc) 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Marker = void 0; var _symbols = require("./symbols"); var _jsxRuntime = require("react/jsx-runtime"); /** * @author: yanxianliang * @date: 2025-07-23 16:29 * @modified:2025/7/23 16:29 by yanxianliang * @desc: Mark * * Copyright (c) 2025 by yanxianliang, All Rights Reserved. */ const Marker = ({ id, type, color, width = 12.5, height = 12.5, markerUnits = 'strokeWidth', strokeWidth, orient = 'auto-start-reverse' }) => { const Symbol = _symbols.symbols[type]; if (!Symbol) { return null; } return /*#__PURE__*/(0, _jsxRuntime.jsx)("marker", { className: "react-flow__arrowhead", id: id, markerWidth: `${width}`, markerHeight: `${height}`, viewBox: "-10 -10 20 20", markerUnits: markerUnits, orient: orient, refX: "0", refY: "0", children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Symbol, { color: color, strokeWidth: strokeWidth }) }); }; exports.Marker = Marker;