diff --git a/packages/mindplot/src/components/export/FreemindExporter.ts b/packages/mindplot/src/components/export/FreemindExporter.ts index 4c71b55f..cddfe5e6 100644 --- a/packages/mindplot/src/components/export/FreemindExporter.ts +++ b/packages/mindplot/src/components/export/FreemindExporter.ts @@ -254,11 +254,11 @@ class FreemindExporter extends Exporter { } private addFontNode(freemindNode: FreeminNode, mindmapTopic: INodeModel): void { - const fontFamily: string = mindmapTopic.getFontFamily(); - const fontSize: number = mindmapTopic.getFontSize(); - const fontColor: string = mindmapTopic.getFontColor(); + const fontFamily: string | undefined = mindmapTopic.getFontFamily(); + const fontSize: number | undefined = mindmapTopic.getFontSize(); + const fontColor: string | undefined = mindmapTopic.getFontColor(); const fontWeigth: string | number | boolean | undefined = mindmapTopic.getFontWeight(); - const fontStyle: string = mindmapTopic.getFontStyle(); + const fontStyle: string | undefined = mindmapTopic.getFontStyle(); if (fontFamily || fontSize || fontColor || fontWeigth || fontStyle) { const font: Font = this.objectFactory.createFont(); diff --git a/packages/mindplot/src/components/model/INodeModel.ts b/packages/mindplot/src/components/model/INodeModel.ts index 8fcca1c8..04e5c2c7 100644 --- a/packages/mindplot/src/components/model/INodeModel.ts +++ b/packages/mindplot/src/components/model/INodeModel.ts @@ -159,7 +159,7 @@ abstract class INodeModel { this.putProperty('fontFamily', fontFamily); } - getFontFamily(): string { + getFontFamily(): string | undefined { return this.getProperty('fontFamily') as string; } @@ -167,11 +167,11 @@ abstract class INodeModel { this.putProperty('fontStyle', fontStyle); } - getFontStyle(): FontStyleType { + getFontStyle(): FontStyleType | undefined { return this.getProperty('fontStyle') as FontStyleType; } - setFontWeight(weight: FontWeightType) { + setFontWeight(weight: FontWeightType): void { this.putProperty('fontWeight', weight); }