update 增加修改节点方法
This commit is contained in:
parent
64186a52b4
commit
5c7fcd2a66
@ -30,12 +30,19 @@ export default (ops: Options) => {
|
||||
updateProperties({ name: newVal });
|
||||
}
|
||||
};
|
||||
const createModdleElement = (elementType, properties, parent) => {
|
||||
const moddle = modeler.get<Moddle>('moddle');
|
||||
const element = moddle.create(elementType, properties);
|
||||
parent && (element.$parent = parent);
|
||||
return element;
|
||||
};
|
||||
|
||||
return {
|
||||
elementType,
|
||||
showConfig: config,
|
||||
|
||||
updateProperties,
|
||||
createModdleElement,
|
||||
idChange,
|
||||
nameChange
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user