Move ID-Service to editor
Generally only the editor needs to generate new IDs. Before there was need to have it in common because some elements (like compound elements) needed to generte new Elements including IDs. Now all ID stuff is handled by the UnitService and the elements classes are handed the fully built elements. Unfortunately this means that some logic has to move back from classes into the UnitService. To un-bloat the UnitService a (and in the future some more) helper class is created for this logic. The most important thing is, that the UIElement no longer generates an ID when created. The ID has to be created before and passed to the constructor.
Showing
- projects/common/models/page.ts 1 addition, 10 deletionsprojects/common/models/page.ts
- projects/common/models/uI-element.ts 8 additions, 7 deletionsprojects/common/models/uI-element.ts
- projects/common/ui-elements/cloze/cloze-element.ts 3 additions, 127 deletionsprojects/common/ui-elements/cloze/cloze-element.ts
- projects/common/ui-elements/cloze/cloze.component.ts 2 additions, 2 deletionsprojects/common/ui-elements/cloze/cloze.component.ts
- projects/common/ui-elements/drop-list/drop-list.ts 2 additions, 3 deletionsprojects/common/ui-elements/drop-list/drop-list.ts
- projects/editor/src/app/services/id.service.ts 0 additions, 0 deletionsprojects/editor/src/app/services/id.service.ts
- projects/editor/src/app/services/unit.service.ts 15 additions, 3 deletionsprojects/editor/src/app/services/unit.service.ts
- projects/editor/src/app/util/cloze-parser.ts 120 additions, 0 deletionsprojects/editor/src/app/util/cloze-parser.ts
Loading
Please register or sign in to comment