Skip to content

Handling multi-line text and class_set on hover

Pre-release
Pre-release
Compare
Choose a tag to compare
@exetico exetico released this 20 May 21:05
2044e3f

Description

This release contains two improvements related to our hover_action and text_set.

Please do report, if you find anything that doesn't work after the following changes, listed below.

Changes

  • Improvement: If class_set is used with hover_action it now supports settings a class like so:
        hover_action:
          - service: floorplan.class_set
            service_data: '${element.matches(":hover") ? "hover" : ""}'
  • Improvement: text_set will now try and handle multi-line text:
      - service: floorplan.text_set
        service_data: 
          element: sample.multilinegroup_text
          shift_y_axis: 1.5em
          text: |
            > /* Split text to two tspans*/
            return 'Multiline\nTSPAN-Print';

You can control each tspan offset with the shift_y_axis: 1.5em key. If you have a x+y attribute on your tspan-element, but none on your text-element, we'll also move that to your text-element.