style(modeling): use constant instead of magic string
This commit is contained in:
parent
2a940d9a82
commit
4ade805f3d
|
@ -25,6 +25,7 @@ var DEFAULT_LABEL_DIMENSIONS = {
|
|||
height: 20
|
||||
};
|
||||
|
||||
var NAME_PROPERTY = 'name';
|
||||
|
||||
/**
|
||||
* A component that makes sure that external labels are added
|
||||
|
@ -48,8 +49,8 @@ export default function LabelBehavior(
|
|||
element = context.element,
|
||||
properties = context.properties;
|
||||
|
||||
if ('name' in properties) {
|
||||
modeling.updateLabel(element, properties.name);
|
||||
if (NAME_PROPERTY in properties) {
|
||||
modeling.updateLabel(element, properties[NAME_PROPERTY]);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue