Skip to content
Snippets Groups Projects
This project is mirrored from https://*****@github.com/iqb-berlin/verona-modules-aspect.git. Pull mirroring updated .
  1. Jan 22, 2022
  2. Jan 19, 2022
    • rhenck's avatar
      Rework compound child components · 87effdf7
      rhenck authored
      Compound elements are now supposed to use overlays for their child
      elements. This overlay makes selecting child components (by clicking on
      them) and marking them as selected (done by the selection service)
      possible.
      The SelectionService no longer needs special logic to handle compound
      children selection, as they now also have an overlay with the same
      interface as normal (canvas) elements.
      
      A few modifications in connected directives are necessary. The now
      handle children components in a proper array instead of QueryList.
      
      Likert elements do not have clickable children yet and work a little
      differently. This should probably be unitized in the future.
      87effdf7
  3. 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
  4. Nov 22, 2021
  5. Nov 19, 2021
    • rhenck's avatar
      Minor code cleanup · b5f468ea
      rhenck authored
      b5f468ea
    • rhenck's avatar
      Refactor Cloze element to allow clicking on element in the player · 761d22bc
      rhenck authored
      A new variable is introduced for CompoundComponents: 
      "allowClickThrough". With this set components can set their children and 
      overlays to allow clicking on child elements or not. In the editor this 
      is not wanted as the elements internal structure is different and the 
      resulting event target can not be reliably styled. There we need the 
      (span) overlay.
      In the player though elements should be clickable as usual. The player 
      can completely ignore this setting as it is on true (allowing clicking) 
      by default.
      761d22bc
    • rhenck's avatar
      Refactor CompoundElementComponent to extend ElementComponent · a418ac8d
      rhenck authored
      They both have an element model and makes sense that a compound 
      component is also a 'normal' component.
      a418ac8d
  6. Nov 15, 2021
  7. Oct 29, 2021
Loading