Fix copy and paste.

This commit is contained in:
Paulo Gustavo Veiga 2022-02-14 10:35:03 -08:00
parent c4516a7ac1
commit 3119e00b9f
2 changed files with 4 additions and 4 deletions

View File

@ -131,7 +131,7 @@ class NodeModel extends INodeModel {
* @return {mindplot.model.NodeModel} an identical clone of the NodeModel * @return {mindplot.model.NodeModel} an identical clone of the NodeModel
*/ */
clone(): NodeModel { clone(): NodeModel {
const result = new NodeModel(this.getType(), this._mindmap, -1); const result = new NodeModel(this.getType(), this._mindmap);
result._children = this._children.map((node) => { result._children = this._children.map((node) => {
const cnode = node.clone() as NodeModel; const cnode = node.clone() as NodeModel;
cnode._parent = result; cnode._parent = result;
@ -148,7 +148,7 @@ class NodeModel extends INodeModel {
* @return {mindplot.model.NodeModel} * @return {mindplot.model.NodeModel}
*/ */
deepCopy(): NodeModel { deepCopy(): NodeModel {
const result = new NodeModel(this.getType(), this._mindmap, -1); const result = new NodeModel(this.getType(), this._mindmap);
result._children = this._children.map((node) => { result._children = this._children.map((node) => {
const cnode = (node as NodeModel).deepCopy(); const cnode = (node as NodeModel).deepCopy();
cnode._parent = result; cnode._parent = result;

View File

@ -68,7 +68,7 @@ class Menu extends IMenu {
const fontSizeBtn = $('#fontSize'); const fontSizeBtn = $('#fontSize');
if (fontSizeBtn) { if (fontSizeBtn) {
const fontSizeModel = { const fontSizeModel = {
getValue() { getValue(): number {
const nodes = designerModel.filterSelectedTopics(); const nodes = designerModel.filterSelectedTopics();
let result = null; let result = null;
@ -82,7 +82,7 @@ class Menu extends IMenu {
} }
return result; return result;
}, },
setValue(value) { setValue(value: number) {
designer.changeFontSize(value); designer.changeFontSize(value);
}, },
}; };