Skip to content
Snippets Groups Projects
This project is mirrored from https://*****@github.com/iqb-berlin/verona-modules-aspect.git. Pull mirroring updated .
  1. Jun 23, 2023
  2. Jun 15, 2023
  3. Nov 20, 2022
    • rhenck's avatar
      [editor] Add control to allow element interaction · 596a70c1
      rhenck authored
      - Part of the properties panel for every element (like delete and 
      duplicate)
      - This allows interacting with elements, generating events and inpect 
      their usage. Usually this is unwanted since it might interfere with 
      dragging the overlay, but sometimes you want to get a feel for the 
      element or check it's contents (GeoGebra for example)
      596a70c1
  4. Oct 21, 2022
    • jojohoch's avatar
      Implement HotspotImage · b174d3a2
      jojohoch authored
      - A HotspotImage has an image and divs placed on it, which are used
      as hotspots
      - Inherits from FormElementComponent, which is why the hotspots are kept
        as a list in the value property.
      - Can be validated as required and uses its own custom validator
      b174d3a2
  5. Aug 08, 2022
  6. Aug 02, 2022
  7. Jun 09, 2022
  8. Jun 03, 2022
    • rhenck's avatar
      Fix type issues · e1ab36e3
      rhenck authored
      Remove 'any's be adding proper types and using 'never'.
      e1ab36e3
  9. May 17, 2022
    • rhenck's avatar
      Refactor model interfaces to classes · 2e9be6e9
      rhenck authored
      This way elements can handle their logic themselves without having to
      rely on outside utility classes.
      
      Also restructure files in common in a more logical way.
      2e9be6e9
  10. May 05, 2022
  11. Apr 14, 2022
  12. Apr 06, 2022
  13. Apr 04, 2022
    • rhenck's avatar
      Clean likert interfaces · 07921403
      rhenck authored
      The LikertColumn is actually just an image-text-combo. Has a generalized 
      name now.
      The other interface was not needed anymore and has been deleted.
      07921403
  14. Mar 30, 2022
  15. Feb 21, 2022
    • rhenck's avatar
      Refactor properties panel · 53ef919f
      rhenck authored
      - Use sub components to reduce the size of the templates
      - Introduce field sets for input groups like dimensions and position
      - Improve logic to determine when to show some fields
      53ef919f
  16. Feb 18, 2022
    • rhenck's avatar
      Refactor style interface · 6237ccb2
      rhenck authored
      - Unify font and surface props
      - Use intersection type for additional properties
      - Also rework editor props panel to properly create the combined 
      properties recursively, passing the results to its child panel (tabs).
      New algorithm works without lodash, therefore the package is removed.
      6237ccb2
  17. Feb 17, 2022
    • rhenck's avatar
      Rework models from classes to interfaces · f416ce14
      rhenck authored
      This removes all the classes and goes back to simple interfaces for
      unit, pages etc and all elements. This makes creating them easier and
      cleaner.
      Things like specific needs when setting element properties and most
      importantly compatibility handling is done by a special service module,
      that knows all the elements and how to repair old their potentially
      outdated definitions.
      f416ce14
  18. Feb 09, 2022
    • rhenck's avatar
      Change all selector prefixes from "app" to "aspect" · a6bdf445
      rhenck authored
      This is done according to the Angular best practices and minimizes
      namespace collisions when using other packages which might use the same
      selectors.
      
      Technically the selectors are not even becessary since we use an Angular
      component factory to create element components but it is still useful
      for the DOM element naming, for debugging purposes for example.
      a6bdf445
  19. Jan 07, 2022
  20. Dec 10, 2021
    • rhenck's avatar
      [editor] Fix element duplication · 2e743910
      rhenck authored
      Was not correctly creating new instances of non-primitive values. Now
      uses "JSON.parse(JSON.stringify(element))" for deep copying the element
      first.
      
      Also refactor by moving the method to the UnitService, where all ID
      handling should take place.
      2e743910
  21. Dec 03, 2021
  22. Dec 02, 2021
  23. Dec 01, 2021
  24. Nov 30, 2021
    • rhenck's avatar
      [editor] Improve flattening of elements · 566d71cc
      rhenck authored
      Use a copy of the original elements to avoid accidentally changing them.
      566d71cc
    • rhenck's avatar
      [editor] Fix properties panel with multiselect · 5d575326
      rhenck authored
      The change of moving some properties to sub objects broke the creation 
      of the combinedProperties object, which can't deal with nested objects. 
      To circumvent that all elements are now flattened before being combined.
      The connected property panels now again look for the properties on the 
      element itself and not in sub-objects.
      5d575326
    • rhenck's avatar
      Refactor dnd values to be objects with IDs and add image support · bda12d70
      rhenck authored
      - Dnd values now have a special type that has an ID, a string and
        another string for an image path.
      - A new dialog exists for editing thoe options. Similarly to the likert
        header.
      bda12d70
  25. Nov 26, 2021
    • rhenck's avatar
      Refactor element class and interface structure · 4a413b60
      rhenck authored
      The problem being solved is that compound-sub-elements must not have
      all the properties other elements have. For exampe positioning info.
      Sub-Elements are positioned inline. To avoid having similar class
      inheritance structures for positioned and inline elements, we use
      interface. Positioning is done via interface and is therefore optional.
      
      Those optional properties are kept in an object in a variable. This
      allows to hide specifics from element classes and removes the need to
      initialize all the fields in every class using the interface.
      The elements mostly care about their own specific properties anyway.
      
      The same technique is used for font and surface elements. Here we also
      don't want to initialize all the styles in every class.
      
      Changing values of element properties works like before. Just set the
      property as if it would be a direkt prop of the element. The element
      itself puts the value in the currect sub-object (positioningProps,
      fontProps etc).
      
      For reading the values there is a similar method, but it is not used
      anywhere by now. Since the properties panel operates on the raw values
      anyway (refer CombinedProperties) and for element components this would
      mean calling a function in the template, which caused change detection
      to run the function very often and is therefore bad practice.
      
      Additional notes and refactorings:
      - Restructure all files in common. UIElements in the same folder etc.
      - Move all interfaces to the UIElement file. This avoids circular
        imports, which would be needed to allow PositionedElement to extend
        UIElement.
      - Interface initializers also handle reading values in the old form.
      - Add PositionedElement for use in canvas overlays. This is a UIElement
        with guaranteed postionProps.
      - Don't export all Material packages from common, only the ones
        used in player and editor. The rest is only used in common and
        does not need to be exported.
      4a413b60
  26. Nov 20, 2021
    • rhenck's avatar
      [editor] Refactor element deletion logic · f12a099d
      rhenck authored
      No longer needs the appropriate section, but instead loops through all 
      page sections. It was somewhat complicated to know the corresponding 
      section and this solution solves that. Though at the price of some 
      unnecessary element lookup.
      
      Another upside is that elements from different sections can be deleted 
      simultaneously.
      f12a099d
  27. Nov 11, 2021
  28. Nov 10, 2021
    • rhenck's avatar
      Refactor elements to use the model's value · 373108a5
      rhenck authored
      This change mainly helps the editor.
      The idea is to make the element components have the correct value of
      their model and don't rely on the formcontrol value. The formcontrol
      can be hard to manipulate, especially in compound elements. Setting
      the model value is way easier.
      
      The formcontrols are kept and should not interfere.
      373108a5
  29. Nov 08, 2021
    • rhenck's avatar
      Add new element DropList · 4dda125e
      rhenck authored
      This element has a list of string as editable options. Those strings 
      form draggable elements which may be reordered or moved between 
      different DropList elements.
      
      Also refactor option change logic to allow any property not just the 
      text property.
      4dda125e
  30. Nov 02, 2021
  31. Nov 01, 2021
    • rhenck's avatar
      [editor] Allow settings values to null · 6c0a1a82
      rhenck authored
      This is necessary to reset elements like radio button group. We use null 
      for that instead of undefined.
      
      The check was in place before to make sure input fields only accept 
      valid values (no text in a number field for example). Angular thinks a 
      null value is valid so we have to do this extra check. This is now done 
      directly in the template before calling the updateModel method.
      6c0a1a82
  32. Oct 25, 2021
  33. Oct 22, 2021
Loading