Difference between revisions of "Selection Object"

From MSX - Wiki
Jump to navigation Jump to search
 
Line 19: Line 19:
 
Indicates if the selection is important. This property only has an effect if the application is controlled with mouse or touch. If this property is set to <code>true</code>, the corresponding content item action will only be executed if the item has the focus.
 
Indicates if the selection is important. This property only has an effect if the application is controlled with mouse or touch. If this property is set to <code>true</code>, the corresponding content item action will only be executed if the item has the focus.
  
'''Note: Since version 0.1.135, the item also has the focus when the cursor is over it and the hover effect is set to preselect (Settings → Hover Effect → Preselect).'''
+
'''Note: Since version 0.1.136, the item also has the focus when the cursor is over it and the hover effect is set to preselect (Settings → Hover Effect → Preselect).'''
 
|-
 
|-
 
| <code>headline</code> || <code>string</code> || <code>null</code> || No || data-sort-value=111|'''0.1.111''' ||  
 
| <code>headline</code> || <code>string</code> || <code>null</code> || No || data-sort-value=111|'''0.1.111''' ||  

Latest revision as of 10:04, 6 May 2021

The selection object can be used to specify the behavior of a content item if it is selected (i.e. if it has the focus).

{
    "important": false,
    "headline": "Selection Headline",
    "background": "http://link.to.image",    
    "action": null,
    "data": null    
}
Property syntax of selection object
Property Type Default Value Mandatory Since Version Description
important boolean false No 0.1.110

Indicates if the selection is important. This property only has an effect if the application is controlled with mouse or touch. If this property is set to true, the corresponding content item action will only be executed if the item has the focus.

Note: Since version 0.1.136, the item also has the focus when the cursor is over it and the hover effect is set to preselect (Settings → Hover Effect → Preselect).

headline string null No 0.1.111

The headline of the content that is used if the corresponding content item has the focus. This headline is attached as sub-headline to the content headline. If the content does not have a headline, this headline is used for that.

background string null No 0.1.110

The background image that is used if the corresponding content item has the focus. This property has no effect if the content is displayed in a panel.

action string null No 0.1.110

The selection action that is executed if the corresponding content item becomes the focus. Please see Actions for possible values.

data object null No 0.1.110

The additional data of the selection action that is used if the action is executed. Please see Actions for possible values.

See also[edit]