Skip to content
Snippets Groups Projects
Commit 24d0152e authored by rhenck's avatar rhenck
Browse files

Implement getFormElementModelChildren for Cloze element

parent f0c4d69d
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ export class ClozeComponent extends CompoundElementComponent {
@Output() elementSelected = new EventEmitter<{ element: ClozeElement, event: MouseEvent }>();
getFormElementModelChildren(): InputElement[] {
return [];
return this.elementModel.childElements;
}
selectElement(element: ClozeElement, event: MouseEvent): void {
......
......@@ -17,7 +17,7 @@ import { DropListElement } from './drop-list';
export class ClozeElement extends CompoundElement {
text: string = '<p>Lorem ipsum dolor \\z sit amet \\i</p>';
parts: ClozePart[][] = [];
childElements: UIElement[] = [];
childElements: InputElement[] = [];
constructor(serializedElement: UIElement) {
super(serializedElement);
......@@ -99,9 +99,9 @@ export class ClozeElement extends CompoundElement {
return [y, nextElementType];
}
private static createElement(elementType: string): UIElement {
private static createElement(elementType: string): InputElement {
const elementModel: UIElement = { type: elementType } as UIElement;
let newElement: UIElement;
let newElement: InputElement;
switch (elementModel.type) {
case 'text':
newElement = new TextElement(elementModel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment