/* * This file is part of the kernelstudio package. * * (c) 2014-2025 zlin * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. */ export const createPort = (name: string = 'top', args: Record = { dx: 0 }) => { return { position: { name: name, args: args }, attrs: { circle: { r: 3, // 大小 magnet: true, stroke: '#999', // 边框颜色 strokeWidth: 1, // 边框大小 fill: '#ffffff', // 填充颜色 style: { visibility: 'visible', // 是否可见 }, }, }, }; }; export const createPorts = () => { return { groups: { top: createPort('top'), right: createPort('right'), bottom: createPort('bottom'), left: createPort('left'), }, items: [ { group: 'top', id: 'top' }, { group: 'right', id: 'right' }, { group: 'bottom', id: 'bottom' }, { group: 'left', id: 'left' }, ], }; };