qsoft-x6-materials-six
Version:
qsoft-x6-materials
111 lines (110 loc) • 2.45 kB
JavaScript
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var CustomNode = function CustomNode() {
return {
width: 120,
height: 50,
shape: 'react-shape',
ports: {
groups: {
top: {
position: 'top',
attrs: {
circle: {
r: 5,
magnet: true,
stroke: '#027AFF',
strokeWidth: 1,
fill: '#fff',
style: {
visibility: 'hidden',
opacity: '1'
}
}
},
zIndex: 99
},
right: {
position: 'right',
attrs: {
circle: {
r: 5,
magnet: true,
stroke: '#027AFF',
strokeWidth: 1,
fill: '#fff',
style: {
visibility: 'hidden',
opacity: '1'
}
}
},
zIndex: 99
},
bottom: {
position: 'bottom',
attrs: {
circle: {
r: 5,
magnet: true,
stroke: '#027AFF',
strokeWidth: 1,
fill: '#fff',
style: {
visibility: 'hidden',
opacity: '1'
}
}
},
zIndex: 99
},
left: {
position: 'left',
attrs: {
circle: {
r: 5,
magnet: true,
stroke: '#027AFF',
strokeWidth: 1,
fill: '#fff',
style: {
visibility: 'hidden',
opacity: '1'
}
}
},
zIndex: 99
}
},
items: [{
id: 't',
group: 'top'
}, {
id: 'r',
group: 'right'
}, {
id: 'b',
group: 'bottom'
}, {
id: 'l',
group: 'left'
}]
},
component: function component(node) {
var name = node.prop('name');
return /*#__PURE__*/React.createElement("div", {
style: {
width: '100%',
height: '100%',
textAlign: 'center',
lineHeight: '50px',
border: '2px solid #027AFF',
borderRadius: 4,
background: '#bedcff'
}
}, name);
}
};
};
var _default = exports["default"] = CustomNode;