Rework class constructors
In Player-context the constructors are to fail, when the given properties are not exactly as expected. Therefoore they are validated. When this validation fails, an environment variable is checked to determine if the element should be created anyway with defaults. This switch is off in player-context. But the Editor is not so strict and can create elements with incomplete parameters. There is also a new VersionManager which checks given unit definitions for version-validity. Upon failing this check Player and Editor show error messages. The Editor accepts a certain unit definition version, but shows a warning. The Editor checks units for invalid references after loading. If any are found, they are removed and an info-panel is shown.
Showing
- angular.json 25 additions, 3 deletionsangular.json
- docs/unit_definition_changelog.txt 13 additions, 1 deletiondocs/unit_definition_changelog.txt
- package.json 4 additions, 4 deletionspackage.json
- projects/common/components/unit-def-error-dialog.component.ts 13 additions, 0 deletions...ects/common/components/unit-def-error-dialog.component.ts
- projects/common/environment.ts 16 additions, 0 deletionsprojects/common/environment.ts
- projects/common/models/elements/button/button.ts 49 additions, 15 deletionsprojects/common/models/elements/button/button.ts
- projects/common/models/elements/compound-elements/cloze/cloze-child-elements/text-field-simple.ts 60 additions, 18 deletions...-elements/cloze/cloze-child-elements/text-field-simple.ts
- projects/common/models/elements/compound-elements/cloze/cloze-child-elements/toggle-button.ts 45 additions, 11 deletions...ound-elements/cloze/cloze-child-elements/toggle-button.ts
- projects/common/models/elements/compound-elements/cloze/cloze.ts 48 additions, 18 deletions...s/common/models/elements/compound-elements/cloze/cloze.ts
- projects/common/models/elements/compound-elements/cloze/tiptap-editor-extensions/button.ts 1 addition, 2 deletions...ompound-elements/cloze/tiptap-editor-extensions/button.ts
- projects/common/models/elements/compound-elements/cloze/tiptap-editor-extensions/drop-list.ts 1 addition, 2 deletions...ound-elements/cloze/tiptap-editor-extensions/drop-list.ts
- projects/common/models/elements/compound-elements/cloze/tiptap-editor-extensions/text-field.ts 1 addition, 4 deletions...und-elements/cloze/tiptap-editor-extensions/text-field.ts
- projects/common/models/elements/compound-elements/cloze/tiptap-editor-extensions/toggle-button.ts 1 addition, 2 deletions...-elements/cloze/tiptap-editor-extensions/toggle-button.ts
- projects/common/models/elements/compound-elements/likert/likert-row.ts 31 additions, 9 deletions...on/models/elements/compound-elements/likert/likert-row.ts
- projects/common/models/elements/compound-elements/likert/likert.ts 63 additions, 16 deletions...common/models/elements/compound-elements/likert/likert.ts
- projects/common/models/elements/element.ts 119 additions, 42 deletionsprojects/common/models/elements/element.ts
- projects/common/models/elements/frame/frame.ts 48 additions, 19 deletionsprojects/common/models/elements/frame/frame.ts
- projects/common/models/elements/geometry/geometry.ts 57 additions, 20 deletionsprojects/common/models/elements/geometry/geometry.ts
- projects/common/models/elements/input-elements/checkbox.ts 24 additions, 5 deletionsprojects/common/models/elements/input-elements/checkbox.ts
- projects/common/models/elements/input-elements/drop-list.ts 58 additions, 17 deletionsprojects/common/models/elements/input-elements/drop-list.ts
Loading
Please register or sign in to comment