AlwaysOnFacetModule (Component)

From Neos Wiki
Jump to navigation Jump to search
This page contains changes which are not marked for translation.


This article or section is a Stub. You can help the Neos Wiki by expanding it.



Intoduction

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated
Enabled Bool Controls whether or not this component is enabled
_targets (list) Slot List The list of slots currently reparented into the active root.

Behavior

This component only applies to Facets.

When a facet is installed in a dashboard, all of the children of a slot containing a AlwaysOnFacetModule are reparented to a slot outside of the dashboard. This slot is active when the dashboard is closed, otherwise the facet is inactive due to being under an inactive slot.

Do not manually modify the _targets list, as it is managed during the normal lifetime of the component. Manually modifying the list may cause unexpected behavior.

This will change the hierarchy of the facet, if you rely on your facet using dynamic variables they may disconnect due to reparenting (many parts of facets are re-parented, be warned).

Avoid putting this above the UIX elements of the facet, as it will reparent them and they will no longer show up or may break the canvas.

Examples

For creating a taco facet that reports live taco statistics from a websocket, and plays an audio clip when a new taco deal is available. In this example the websocket and audio output are active sensitive, and will not work when the dashboard is closed without an AlwaysOnFacetModule.

 Taco Facet
   Canvas - (Having the same name helps when debugging)
     Background and Taco pictures
   Logic - (with AlwaysOnFacetModule)
     Taco Facet Logic - (Having the same name helps when debugging)
       Logix, websockets, audio, and other active sensitive content

When installed, the facet is pulled apart into the following, the exact hierarchy is prone to change but this is the general structure.

 Dashboard Root
   AlwaysOnFacetRoot
     Taco Facet Logic
   DashOffset
     ...Many other slots, some of which go inactive when the dashboard is closed...
       Facets
         Taco Facet
           Canvas
             Background and Taco pictures

Related Components