diff --git a/lib/core/ElementFactory.spec.ts b/lib/core/ElementFactory.spec.ts index b02310794..ee190c3c4 100644 --- a/lib/core/ElementFactory.spec.ts +++ b/lib/core/ElementFactory.spec.ts @@ -11,7 +11,8 @@ const shape1 = elementFactory.create('shape', { x: 100, y: 100, width: 100, - height: 100 + height: 100, + foo: 'bar' }); const shape2 = elementFactory.create('shape', { @@ -19,22 +20,26 @@ const shape2 = elementFactory.create('shape', { x: 100, y: 100, width: 100, - height: 100 + height: 100, + foo: 'bar' }); elementFactory.create('connection', { id: 'connection', source: shape1, target: shape2, - waypoints: [] + waypoints: [], + foo: 'bar' }); elementFactory.create('root', { - id: 'root' + id: 'root', + foo: 'bar' }); elementFactory.create('label', { - id: 'label' + id: 'label', + foo: 'bar' }); elementFactory.create('connection'); diff --git a/lib/model/index.d.ts b/lib/model/index.d.ts index 02e39b26a..992e85262 100644 --- a/lib/model/index.d.ts +++ b/lib/model/index.d.ts @@ -15,6 +15,7 @@ export interface ModelBaseAttrs { parent?: Base; incoming?: Connection[]; outgoing?: Connection[]; + [key: string]: any; } export interface ModelAttrsShape extends ModelBaseAttrs {