From 696718b3f61408c68a79dc2feb7db7b23818584f Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Mon, 22 Nov 2021 16:10:58 +0100
Subject: [PATCH] Fix cloze element re-generating all child elements on load

The player is supposed to take all the elements already defined and
generated in the editor. Therefore the call to generate all elements
from the text is not a general thing but specialized for the editor.

Right now the editor does no longer generate the cloze parts on load but
only when the text prop has been touched.
---
 projects/common/models/compound-elements/cloze-element.ts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/projects/common/models/compound-elements/cloze-element.ts b/projects/common/models/compound-elements/cloze-element.ts
index d4970df73..fe283c885 100644
--- a/projects/common/models/compound-elements/cloze-element.ts
+++ b/projects/common/models/compound-elements/cloze-element.ts
@@ -33,8 +33,6 @@ export class ClozeElement extends CompoundElement implements FontElement {
     super(serializedElement);
     Object.assign(this, serializedElement);
     Object.assign(this, initFontElement(serializedElement));
-    this.createParts(this.text as string);
-
     this.height = 200;
     this.width = 500;
   }
-- 
GitLab