diff --git a/app/angular/conceptual/sidebarControl.js b/app/angular/conceptual/sidebarControl.js index 14867a2f..bda26590 100644 --- a/app/angular/conceptual/sidebarControl.js +++ b/app/angular/conceptual/sidebarControl.js @@ -68,7 +68,7 @@ const controller = function($rootScope, $timeout) { } $ctrl.updateName = (newName) => { - if (newName != "") { + if (newName != null) { $ctrl.onUpdate({ "event": { "type": "name", diff --git a/app/joint/shapes.js b/app/joint/shapes.js index c9e1715d..0aa98e99 100644 --- a/app/joint/shapes.js +++ b/app/joint/shapes.js @@ -147,15 +147,21 @@ erd.Associative = joint.dia.Element.extend({ erd.BlockAssociative = joint.dia.Element.extend({ markup: '', defaults: _.defaultsDeep({ - type: 'erd.BlockAssociative', - supertype: 'Entity', - size: { width: 100, height: 50 }, - attrs: { - '.outer': { - fill: 'white', stroke: 'black', - points: '100,0 100,60 0,60 0,0' - } - } + type: 'erd.BlockAssociative', + supertype: 'Entity', + size: { width: 100, height: 50 }, + attrs: { + '.outer': { + fill: 'white', stroke: 'black', + points: '100,0 100,60 0,60 0,0' + }, + text: { + text: '', + 'font-family': 'Arial', 'font-size': 12, + ref: '.outer', 'ref-x': .1, 'ref-y': .05, + 'x-alignment': 'start', 'y-alignment': 'start' + } + } }, joint.dia.Element.prototype.defaults) });