Initial commit
This commit is contained in:
34
modeler/src/views/decision/builder/register.ts
Normal file
34
modeler/src/views/decision/builder/register.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import { register } from '@antv/x6-vue-shape';
|
||||
import ModelElement from './node.vue';
|
||||
import { createPorts } from './ports';
|
||||
|
||||
export const registerNodeElement = (type: string = 'task') => {
|
||||
console.info('registerNodeElement');
|
||||
register({
|
||||
shape: type,
|
||||
component: ModelElement,
|
||||
width: 120,
|
||||
attrs: {
|
||||
body: {
|
||||
stroke: 'transparent',
|
||||
strokeWidth: 0,
|
||||
fill: 'transparent',
|
||||
rx: 4,
|
||||
ry: 4,
|
||||
},
|
||||
},
|
||||
dragging: {
|
||||
enabled: true,
|
||||
},
|
||||
ports: createPorts(),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user