Panel: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
mNo edit summary
 
(75 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{learned|what panels are|how panels relate to the {{software}}|what types of panels are available to you|common use cases of panels|how to add and edit panels in a project}}
[[File:Api_current_situation_calculation.png|thumb|right|400px|[[Panel]]s in comparison to [[Excel]]s, [[Overlay]]s and [[Indicator]]s]]
[[File:Panel-example.jpg|left|thumb|300px|A custom Panel open in the [[Viewer ]]interface.]]
Panels are custom, user-defined interface elements, which can be created and configured in the [[Editor]]. Panels are purposefully left generic and abstract, as their intent is to allow for as much freedom as possible to implement a [[Project]]-specific or [[Template]]-specific component. Panels can be given a location in the [[project area]], which makes them accessible via a [[Popup]] in the [[3D Visualization]]. Clicking the [[Popup]] opens the Panel as part of the [[Viewer ]]interface. Panels can also be [[show custom panel Client Event|opened]] via an [[Event]], or even left entirely inaccessible.


==Panels==
Most panels render HTML-content, which means they can display text without additional formatting. Further layout and styling can be implemented by using [[HTML|HTML, CSS]], and [[javascript]]. This enables Panels to also be opened in a web browser or included in the rendering of a [[Web interface]].
In a software context, panels are windows, dialogs or similar generic interface elements which are presented to the user. Panels can either be small prompts or dialogs which facilitate an inquiry or message towards the user, or they can be larger, more complex interface components containing multiple texts and/or elements.


====Usage within the {{software}}====
The content of a number of types of Panels can be made more dynamic by using [[tag]]s, or by using an [[Excel]] to compute its contents intelligently based on [[TQL|data in the project]]. This allows Panels to display information specific to a Panel or specific data in the [[Project]], such as [[Attribute]]s and [[Stakeholder]]s.
<!--[[File:ReleaseNotesPanel.jpg|thumb|left|180px|Release Notes Panel from Editor]]-->
In a [[project]], panels are a term specifically used for a user-defined interface element, which can be created and configured in the [[editor]]. Panels are purposefully left generic and abstract. The contents are entirely left open for a project- or template-specific implementation. A panel can be placed inside the [[3D World]], where its location is indicated by a pop-up icon, which has to be clicked on to reveal the hidden panel. Panels can also be opened via [[Client_Events|client events]] or even left idle.


Most panels render HTML-content, which means they can display text without additional formatting. Further layout and styling can be implemented by using HTML, CSS, and JavaScript. This enables panels to also be opened in a web browser or included in the rendering of a [[web interface]].
Additionally, most panels can also support certain [[tag]]s, which allows users to display information specific to a panel, such as the owner and attributes assigned to this panel.
{{clear|left}}
{{clear|left}}
==When to use==
There are a number of use-cases for which the use of Panels can be desirable. Most of those situations revolve around having custom interface elements, providing information or interaction for the end-user.
===Information===
Panels are primarily used to provide information to the end user. Any text or images they display, provide a source of (static) content in the session. Especially text and web panels fall into this category. Excel panels can also provide dynamic information on the current state of affairs in the session.
===Interaction===
Panels can also offer options to interact with the session. This can be done by means of predefined {{inlink|answers}} or through buttons defined by the HTML content, which send instructions to the project via the [[API]]. Depending on the amount of effort that went into its making, panels allow for very complex interaction in the [[3D Visualization]]. All types of panels allow for the implementation of "answers", though text and Excel panels also work well with HTML buttons and input elements.
===Calculation model===
Another utility of panels is in the form of a hidden [[calculation model]]. The Excel spreadsheet attached to an Excel panel can contain a number of equations and formulations ([[TQL|queries]]) that yield a specific outcome. For example, in the case of a dynamic traffic model, information can be retrieved first (using SELECT-queries), after which these data are processed according the following specifications in the Excel file. The end product may be the calculated traffic intensities at various locations in the [[project area]]. Using UPDATE-queries, these results can subsequently adjusted the visibility of the Excel panel's Popup. Stakeholders will not notice anything of the underlying calculation model, except for its results (e.g., changing traffic intensities).
===Web interface===
: '' Main article: [[Web interface]]''
The [[Web interface]] can be enriched by adding a Panel to it with [[HTML|HTML, CSS and/or javascript code]]. The content of the Panel is directly injected into the [[Web interface]].


==Types==
==Types==
There are 5 types of panels available in the {{software}}.
There are a number of types of panels available in the {{software}}.


{| class="wikitable"
{| class="wikitable"
Line 19: Line 34:
! Description
! Description
! Function
! Function
! Templatable
|-
|-
| Text panel
| Text Panel
| Its contents are defined directly as text.
| Its contents are defined directly as text.
| The text is interpreted as HTML-content and directly displayed as content of the panel. If it is HTML-formatted content, it will be displayed according the specified styling.  
| The text is interpreted as HTML-content and directly displayed as content of the panel. If it is HTML-formatted text, it will be displayed according the specified styling.
| Text [[Template Panel]]
|-
|-
| Web panel
| Web Panel
| Its contents are defined by a URL (web address).
| Its contents are defined by a URL (web address).
| The web page to which is referred constitutes the content of the panel. When attempting to open the panel in a web browser, the web page will be accessed directly (i.e. not via the {{software}}).
| The web page to which is referred constitutes the content of the panel. When attempting to open the panel in a web browser, the web page will be accessed directly (i.e. not via the {{software}}).
|
|-
|-
| Global panel
| Global Panel
| One or more [[global]]s are linked to this panel, allowing an end-user to edit the values of those globals during a session.
| One or more [[global]]s are linked to this panel, allowing an end-user to edit the values of those globals during a session.
| The panel has a predefined structure in the [[session interface]] and a fixed location. For each linked global an input field with that global's value is displayed. This value can be altered and submitted by the end-user in the session. The value of the global will be changed accordingly. This panel does not have an HTML-representation, hence it can neither be opened in a web browser nor can it be integrated in the [[web interface]].
| The panel has a predefined structure in the [[Viewer ]]interface and a fixed location. For each linked global an input field with that global's value is displayed. This value can be altered and submitted by the end-user in the session. The value of the global will be changed accordingly. This panel does not have an HTML-representation, hence it can neither be opened in a web browser nor can it be integrated in the [[web interface]].
|
|-
|-
| Excel panel
| Excel Panel
| Its contents are defined by an [[Excel]] file.
| Its contents are defined by an [[Excel]] file.
| Each time data in the [[project]] or [[session]] are updated, the Excel file is recalculated. The results are interpreted as (HTML-formatted) text and displayed as such. Effectively, this panel is similar to a text panel, but rather than a static definition of the text content, the definition is dynamically generated through the spreadsheet.
| Each time data in the [[project]] or [[session]] are updated, the Excel file is recalculated. The results are interpreted as HTML-formatted text and displayed as such. Effectively, this panel is similar to a text panel, but rather than a static definition of the text content, the definition is dynamically generated through the spreadsheet.
|-
| Excel [[Template Panel]]
| Template Excel panel
| This is not a panel in itself, but forms a definition by which panels can be generated automatically. The "instances" produced by a template panel behave the same as their 'regular' counterparts.
| Based on how the template panel is defined, a number of "instances" of the panel will be generated. Configurations, such as the size, model, and [[attribute]]s of the panel are carried over directly. The panel name, the assigned [[stakeholder]] and certain [[TQL|queries]] from the Excel file are modified based on what the template panel is applied to.
|}
|}
===Template Panels===
{{main|Template Panel}}
Some Panels can also be generated through the use of [[Template Panel]]s. These behave mostly like normal Panels but are not directly accessible to the end-user. Instead, based on a [[Template Panel]], Panels can be generated automatically, related to specific data in the [[Project]].


==Properties==
==Properties==
Panels have a number of properties, which can be configured in the editor.
Panels have a number of properties, which can be configured in the editor. They define how the Panel is shown, and what is displayed.


{| class="wikitable"
===General properties===
|-
The general properties of the Panel represent the overall configuration, excluding the actual content which is specific to the type of Panel itself.
! Property
! Description
|-
| Name
| When a panel is opened, its name is displayed at the top, telling the end-user what the panel is about.
|-
| Sizing
| The size of the panel can be adjusted, so that it fits the content well. It is also possible to set the location of the panel within the interface.
|-
| Availability
| When the panel is placed in the 3D world, it can be set to either be visible or invisible. If it is set visible, it can also be told whether to draw attention or not. The panel can also be made only accessible to a specific stakeholder or a selected group of stakeholders.
|-
| Visualization
| When the panel is placed in the 3D world, its corresponding pop-up icon is that of a green tick mark. However, there is selection of different icons available from which one can be chosen. The selected icon has both a 3D representation as well as a 2D representation for higher [[zoom level]]s and for the [[web interface]].
|-
| Overlay
| A panel, in itself, may not provide all the information the user wishes to show. If its content is related to specific geographic information that belongs to a certain overlay, the panel can be coupled to that overlay. Whenever the panel is opened in the future, the coupled overlay will be applied simultaneously.
|-
| Content
| The core functionality of panels is displaying their content. Depending on the type of panel, the type of content can differ. In general, a panel without content has no purpose.
|}


==Attributes==
[[File:panels-right-name.jpg|right|thumb|Input field for the panel name.]]
Panels can have any number of arbitrary [[attribute]]s, which allows for the attachment of additional data in an accessible and versatile fashion. Some attribute names are already reserved to fulfill a special function.
; Name
: When a panel is opened, the name of the Panel is displayed at the top, informing the end-user what the panel is about.
{{clear}}


{| class="wikitable"
[[File:panels-right-layout.jpg|right|thumb|Input fields for the panel location.]]
! Attribute
; Interface location
! Unit
: The location of the Panel within the interface. The X-value represents the distance from the left-hand side of the [[Viewer ]]interface. The Y-value represents the distance from the bottom of the [[Viewer ]]interface.
! Description
{{clear}}
|-
|{{anchor|ATTENTION|ATTENTION}}
|boolean
|This is an attribute representation of the attention property and determines whether or not the panel draws attention.
|-
|{{anchor|COLOR|COLOR}}
|color
|The color of the 2D version of the pop-up icon designating the panel. This can be used to differentiate between multiple pop-ups.
|-
|{{anchor|POPUP_TYPE|POPUP_TYPE}}
|nominal integer
|The 3D model of the pop-up and its 2D counterpart. There can be chosen from a wide selection of models.
|-
|{{anchor|SCALE|SCALE}}
|decimal value
|The size of the 2D model of the pop-up in the 3D world. Note that the size is only updated when the visibility of the panel is updated. This can be done either by (re)placing it in the world or toggling its visibility.
|-
|{{anchor|VISIBLE|VISIBLE}}
|boolean
|This is an attribute representation of the visibility property and determines whether or not the panel is visible.
|-
|{{anchor|VISIBLE_TIMEFRAME|VISIBLE_TIMEFRAME}}
|integer
|The timeframe as of when the panel (pop-up) becomes visible during simulation. This attribute requires the attribute VISIBLE to be set to 1; if not, the pop-up will not show at all. The dynamic visibility of the panel (pop-up) is only apparent when simulating a [[weather]] effect and, therefore, will not work in a normal overlay simulation run. The visualisation and division of timeframes is automatically derived from the [[Water Overlay]] present in the [[project]].
|}


==Use cases==
[[File:panels-right-wh.jpg|right|thumb|Input fields for the panel size.]]
; Dimensions
: The size of the panel, so that it fits the content of the Panel. Ideally, a Panel should be large enough to fit the content without the need to scroll, but not so large as to leave space of the Panel empty.
{{clear}}


===Information===
[[File:panels-right-visible.jpg|right|thumb|Checkbox for the panel visibility.]]
Panels are primarily used to provide information to the end user. Any text or images they display, provide a source of (static) content in the session. Especially text and web panels fall into this category. Excel panels can also provide dynamic information on the current state of affairs in the session.
; Visibility
 
: When the Panel has a location in the [[project area]], it is represented by a [[Popup]] in the [[3D Visualization]]. That [[Popup]] is either visible or not, based on this setting. [[Visible (Panel Attribute)|Visibility]] is also accessible as an [[Attribute]], allowing it to be set or modified through [[TQL|queries]].
===Interaction===
{{clear}}
Panels can also offer options to interact with the session. This can be done by means of predefined {{inlink|answers}} or through buttons defined by the HTML content, which send instructions to the project via the [[API]]. Depending on the amount of effort that went into its making, panels allow for very complex interaction in the 3D world. All types of panels allow for the implementation of "answers", though text and Excel panels also work well with HTML buttons and input elements.
 
===Calculation model===
Another utility of panels is in the form of a hidden [[calculation model]]. The Excel spreadsheet attached to an Excel panel can contain a number of equations and formulations ([[TQL|queries]]) that yield a specific outcome. For example, in the case of a dynamic traffic model, information can be retrieved first (using SELECT-queries), after which these data are processed according the following specifications in the Excel file. The end product may be the calculated traffic intensities at various locations in the 3D world. Using UPDATE-queries, these results can subsequently be implemented in the 3D world. By turning off the visibility of the Excel panel, stakeholders will not notice anything of the underlying calculation model, except for its results (e.g., changing traffic intensities).


===Web interface===
[[File:panels-right-attention.jpg|right|thumb|Checkbox for the panel attention.]]
: '' Main article: [[Web interface]]''
; Attention
Depending on the experience you want to provide for the end user, the web interface can be enriched using your own piece of [[HTML|HTML, CSS and JavaScript]] code. This can be done within the web-interface functionality.
: When the Panel has a location in the  [[project area]], the resulting [[Popup]] can draw attention. If it does, arrows will appear in the [[Viewer ]]interface of all [[Stakeholder]]s who are allowed to see the Panel. [[Attention (Panel Attribute)|Attention]] is also accessible as an [[Attribute]], allowing it to be set or modified through [[TQL|queries]].
{{clear}}


==Adding and editing single panels==
[[File:panels-right-stakeholder.jpg|right|thumb|Checkbox and drop-down for the assigned stakeholder(s).]]
; Stakeholder
: Either all [[Stakeholder]]s are permitted to open a Panel, or only a single [[Stakeholder]] is permitted to open a Panel. If only a single [[Stakeholder]] is permitted to view the Panel, other [[Stakeholder]]s will not see the Panel's [[Popup]] in the [[3D Visualization]], even if it is set to be visible. If a [[Stakeholder]] does open the Panel through another route, but does not have permission to view it, the user will see a notice that they are not allowed to view the Panel.
{{clear}}


===Adding/removing panels===
[[File:panels-right-model.jpg|right|thumb|Pop-up model used for in-map visualization.]]
{{Editor location|Panels}}
; Popup model
[[File:panels-left.jpg|framed|left|The [[left panel]] for panels in the editor.]]
: The model of the Panel's [[Popup]], which consists of both a 3D model and a 2D icon. The latter is used instead of the former for high [[Zoom Level]]s and the [[web interface]]. A selection of models is available in the drop-down menu.
{{clear}}


{{Editor steps|title=add a single panel|Select the desired panel type at the bottom of the [[left panel]].|Select "Add Panel".}}
[[File:panels-right-overlay.jpg|right|thumb|Overlay activated when opening the panel.]]
{{Editor steps|title=remove a single panel|Select the "Single Panels" category in the [[left panel]].|Select the specific panel you wish to remove.|Select "Remove".}}
; Overlay
{{clear|both}}
: A panel, in itself, may not provide all the information the user wishes to show. If its content is related to specific geographic information that belongs to a certain overlay, the panel can be coupled to that overlay. Whenever the panel is opened in the future, the coupled overlay will be applied simultaneously.
{{clear}}


===Configuring panels===
[[File:panels-right-point.jpg|right|thumb|Settings regarding the geographical location of the [[Popup]].]]
{{Editor location|Panels|Panel}}
; Location in the [[project area]]
: A Panel's [[Popup]] can be given a location in the [[project area]]. This can be done by selecting the button ''Set Point'' and using the [[brush]] to select its position. To remove it again from the project area, select the button ''Remove Point''.
{{clear}}


====Properties====
===Content===
When you select a single panel, the [[right panel]] will be filled with the information pertaining to the panel. A number of properties can be configured.
 
[[File:panels-right.jpg|framed|left|The [[right panel]] for panels in the editor.]]
 
{| class="wikitable"
|-
! Property
! Description
! Example
|-
| Name
| The name of the panel can be adjusted in the ''Name'' field.
| [[File:panels-right-name.jpg|center|Input field for the panel name.]]
|-
| Panel Layout
| The location of the panel in unit pixels distance from the bottom-left corner of the display. The default location is assigned "-1". The left and right input fields refer to the horizontal and vertical position, respectively.
| [[File:panels-right-layout.jpg|center|Input fields for the panel location.]]
|-
| Panel Width &amp; Height
| The size of the panel in unit pixels. There is some space between the outer frame of the panel and the (inner) frame for the content within. The dimensions filled in the left and right input fields refer to the width and height of the outer frame, respectively.
| [[File:panels-right-wh.jpg|center|Input fields for the panel size.]]
|-
| Visible
| The visibility of the pop-up model in the 3D world. If the panel has a location in the 3D world and its visibility is toggled on (i.e., "1"), a pop-up will show and can be interacted with. If the panel has no location in the 3D world or its visibility is toggled off, its pop-up will not show.
| [[File:panels-right-visible.jpg|center|Checkbox for the panel visibility.]]
|-
| Request Attention
| This property determines whether or not the pop-up model should draw [[attention]] in the 3D world. If the panel is set visible, has a location in the 3D world and is also set to draw attention, its pop-up will start flashing upon appearance and the end user will be shown an arrow indicating its location.
| [[File:panels-right-attention.jpg|center|Checkbox for the panel attention.]]
|-
| Assign to Stakeholder
| This property determines to which stakeholders the panel is accessible. If the checkbox is left unchecked, the panel is accessible to all stakeholders. If checked, only the stakeholder(s) indicated in the dropdown can access the panel. Other stakeholders will not be able to see the panel in the 3D world. If a stakeholder without access attempts to open the panel anyways, for instance through the [[web interface]], they will receive an error message.
| [[File:panels-right-stakeholder.jpg|center|Checkbox and drop-down for the assigned stakeholder(s).]]
|-
| Model
| The model of the panel pop-up, which consists of both a 3D model and a 2D icon. The latter is used instead of the former for high [[zoom level]]s and the [[web interface]]. A selection of models is available in the drop-down menu.
| [[File:panels-right-model.jpg|center|Pop-up model used for in-map visualization.]]
|-
| Overlay
| If the panel is opened, this overlay should be activated to provide essential geographic information to the end user. If set to "NONE", no overlay is used. The overlays integrated in the current project are available in the drop-down menu.
| [[File:panels-right-overlay.jpg|center|Overlay activated when opening the panel.]]
|-
| Set Point
| A panel (pop-up) can be given a location in the [[3D world]]. This can be done by selecting the button ''Set Point'' and using the [[brush]] to select its position. To remove it again from the 3D world, select the button ''Remove Point''.
| [[File:panels-right-point.jpg|center|Settings regarding the geographical location of the pop-up.]]
|-
| Open Panel
| Selecting the ''Open Panel'' button gives the user a preview of the panel and its content inside the session interface. This can be useful for testing purposes. The panel can also be opened in the web browser by selecting <u>Open in Web Browser</u>.
| [[File:panels-right-open.jpg|center|Button and hyperlink to access a preview of the panel content.]]
|}
 
====Content====
Depending on the type of panel, it may have different adjustable elements that control its content.
Depending on the type of panel, it may have different adjustable elements that control its content.


{| class="wikitable"
{| class="wikitable"
|-
|-
! Element
! Type
! Instruction
! Configuring
! Rendering
! Example
! Example
|-
|-
| Text
| Text
| Enter a text in the ''Panel Text'' field to make it the content of the panel. If the content is HTML-formatted, the content of the panel will be formatted accordingly.
| Enter a text in the ''Panel Text'' field to make it the content of the panel. If the content is HTML-formatted, the content of the panel will be formatted accordingly.
| Dynamically rendered content
| [[File:panels-right-conent-text.jpg|center|The text content input field.]]
| [[File:panels-right-conent-text.jpg|center|The text content input field.]]
|-
|-
| Web
| Web
| Enter a URL in the ''Web Link'' field and the assigned web page will be opened as content of the panel.
| Enter a URL in the ''Web Link'' field and the assigned web page will be opened as content of the panel.
| A frame with the displayed website.
| [[File:panels-right-conent-web.jpg|center|The URL input field.]]
| [[File:panels-right-conent-web.jpg|center|The URL input field.]]
|-
|-
| Globals
| Globals
| Select the globals that should be accessible through the panel.
| Select the globals that should be accessible through the panel.
| A predefined interface with input fields and a button so submit new values.
| [[File:panels-right-conent-global.jpg|center|The globals selection list.]]
| [[File:panels-right-conent-global.jpg|center|The globals selection list.]]
|-
|-
| Excel
| Excel
| Select the [[Excel#Using_Excel_files|Excel]] spreadsheet which should calculate the content for this panel.
| Select the [[Excel#Using_Excel_files|Excel]] spreadsheet which should calculate the content for this panel.
| Dynamically rendered content
| [[File:panels-right-conent-excel.jpg|center|The Excel selection button.]]
| [[File:panels-right-conent-excel.jpg|center|The Excel selection button.]]
|}
|}


==Adding and editing template panels==
====Dynamically rendered content====
 
When the content of a Panel is dynamically rendered (i.e. when using a Text Panel or an Excel Panel), the Panel will output some string of text which will be displayed in the Panel to the end-user. Rendering of the content of a Panel occurs in three steps:
===Adding/removing template panels===
# The content of the Panel itself is processed as appropriate. Text is plain text, an Excel is recalculated, etc. This occurs regardless of whether an end-user is viewing the Panel or not.
{{Editor location|Panels}}
# The content's output is processed for any [[tag]]s in the content. These allow data to be inserted dynamically in fixed locations of the content. This occurs on-demand when a user views the Panel.
 
# The content with the [[tag]]s processed is interpreted and displayed as [[HTML]], allowing styling of content and structuring of information according to a flexible and well-known standard. Note that if the resulting content is plain-text, the content will be displayed as plain-text as well.
{{Editor steps|title=add a template panel|Select the "TEMPLATE_EXCEL_PANEL" type at the bottom of the [[left panel]].|Select "Add Panel".}}
 
{{Editor steps|title=remove an instance of a template panel|Select the "Template Panels" category in the [[left panel]].|Select the template panel from which the instance was generated.| Select the specific panel you wish to remove.|Select "Remove".}}
 
{{Editor steps|title=remove a template panel and all of its instances|Select the "Template Panels" category in the [[left panel]].|Select the template panel you wish to remove.|Select "Remove".}}
 
===Configuring and instantiating template panels===
{{Editor location|Panels|Template Panel}}
When selecting a template (Excel) panel, the [[right panel]] will provide a number of adjustable properties. Most of these are the same as for single panels, though with some important differences.
 
[[File:panels-right-template.jpg|framed|left|The [[right panel]] for template Excel panels in the editor.]]
 
{| class="wikitable"
|-
! Property
! Description
! Example
|-
| Name
| The name of the template panel. Each instance of a template panel carries a combination of this name and the name of the object.
| [[File:panels-right-template-name.jpg|center|Input field for the template panel name.]]
|-
| Stakeholder
| The stakeholder with access to this panel. Instead of setting a specific stakeholder, one can specify the type of relation required between the stakeholder and the object in question. If the ''Use Owner'' box is checked, whichever stakeholder owns the object at the time the template panel is being applied, is set to have access to the panel.
By selecting a ''Relational Filter'' only instances of the template panel appear that meet the displayed relational criterion with the configured stakeholder. For example, if the filter is set to "Demolisher", only instances of this template panel will be generated for objects of the selected stakeholder when fulfilling the role of demolisher.
| [[File:panels-right-template-stakeholder.jpg|center|Additional settings for assigning stakeholder(s).]]
|-
| Template
| The type of entity the template should be applied to can be selected in the ''Apply Template on'' drop-down. An additional filter can be implemented by selecting an attribute requisite from the ''With Attribute" drop-down. If these are set, only objects of the specified type that meet the specified attribute (i.e., contain a non-zero value) will have panel instances created.
| [[File:panels-right-template-template.jpg|center|Options for applying the template panel.]]
|-
| Apply template
| When the template panel is configured properly, it can be used to create the actual panel instances appearing in the project. Select "Apply Template" to create the panel instances according all criteria specified above. A message will be prompted, stating the number of panel instances created.
| [[File:panels-right-template-apply.jpg|center|In order to create the instances, click the ''Apply Template'' button.]]
|}
 
Note that, opposite to 'normal' panels, there is no option to directly evaluate the appearance of the template panel. This is because the template panel is merely a definition of how the actual instances should be structured, hence in itself is not an actual panel.


===Editing panel instances===
When a panel with [[HTML]] content is opened, any [[javascript]] script tags are interpreted as well, allowing for more complex client-side functionalities.
Newly created instances of a template panel are editable just like single panels. However, this is not recommended as any changes made to it will be lost the moment the parent template panel is reapplied. In order to achieve the envisioned outcome for specific panel instances, the parent template panel can be altered accordingly and subsequently reapplied to only these objects by selecting a specific common [[attribute]] as application criterion.


==Adding and editing answers==
===Attributes===
A panel can be given "answers". These are buttons that are added to a panel and allow the end-user to close the panel by selecting from the specified options. These "answers" can be further supplemented through the attachment of [[event]]s. When the user selects an "answer" that has one or more events attached to it, these events will get fired (triggered) and will affect the session accordingly.
Panels can have any number of arbitrary [[Attribute]]s, which allows for the definition of additional data in an accessible and versatile fashion. Panels have a number of [[Attribute]]s predefined, which fulfill a special function.


===Adding/removing answers===
It's possible to access and modify the [[Attribute]]s of Panels using [[TQL|queries]].
{{Editor location|Panels|Panel}}


{{Editor steps|title=add an answer to a panel|Select the panel you wish to add an answer to in the [[left panel]].|Select "Add Answer".}}
{{panel attributes|suppresscategory=true|allowselflink=true|
{{:attention (Panel Attribute)}}
{{:color (Panel Attribute)}}
{{:popup type (Panel Attribute)}}
{{:scale (Panel Attribute)}}
{{:visible (Panel Attribute)}}
{{:visible timeframe (Panel Attribute)}}
}}


{{Editor steps|title=remove an answer from a panel|Select the answer you wish to remove.|Select "Remove".}}
===Answers===
A Panel can be given [[Answer (Panel)|Answer]]s. These are buttons that are added to a Panel and allow the end-user to close the Panel by selecting from the specified options. These [[Answer (Panel)|Answer]]s can be further supplemented through the inclusion of [[Event]]s. When the user selects an [[Answer (Panel)|Answer]] that has one or more [[Event]]s attached to it, those [[Event]]s will get fired (triggered) and will affect the [[Session]] accordingly.


===Configuring answers===
{{article end
{{Editor location|Panels|Answer of a panel}}
|howtos=
 
* [[How to add a Panel]]
When selecting an ''answer'', a number of properties can be configured in the [[right panel]].
* [[How to remove a Panel]]
 
* [[How to add a spatial Panel]]
[[File:panels-right-answer.jpg|framed|left|The [[right panel]] for panel ''answers'' in the editor.]]
* [[How to add a Panel which can be opened from an Action Menu]]
 
* [[How to create an alert Panel]]
{| class="wikitable"
* [[How to create an Excel background calculation model]]
|-
* [[How to assign a Panel to a specific Stakeholder]]
! Property
* [[How to inspect the contents of a Panel in a web browser]]
! Description
|seealso=
! Example
* [[Web panel]]
|-
* [[Global panel]]
| Answer Text
[[File:YoutubeLogo1.jpg|link=https://youtu.be/IpQxzjzi1d0|thumb|left|200px|Panels en Globals (Dutch only)]]
| This text will be displayed to the end user if the panels is opened and form one of the selectable options in the case of multiple ''answers''.
}}
| [[File:panels-right-answer-name.jpg|center|Input field for the ''answer'' text.]]
|-
| Events
| One or more events can be coupled to this answer, which will then be fired (triggered) upon selecting this answer. The events are divided into 'server events' and 'client events'. Server events will also trigger changes in the state of the [[session]], whereas client events will only affect the visualization for the end user who selected the answer.
''{{:Editing Events}}
| [[File:panels-right-answer-events.jpg|center|The events fired when the ''answer'' is selected.]]
|}


===Answers as part of template panels===
{{Template:Editor current situation nav}}
Template panels can also have ''answers'' attached to them, which will then also apply to all of its instances. In the case that a template panel has a specific target object (e.g., NEIGHBORHOODS) and one of the ''answers'' features an event (e.g., NEIGHBORHOOD_SET_ATTRIBUTE), the event will only affect the specific target object it was created for.
{{Panel nav}}
[[Category:Items]]

Latest revision as of 10:25, 2 March 2023

Panels in comparison to Excels, Overlays and Indicators
A custom Panel open in the Viewer interface.

Panels are custom, user-defined interface elements, which can be created and configured in the Editor. Panels are purposefully left generic and abstract, as their intent is to allow for as much freedom as possible to implement a Project-specific or Template-specific component. Panels can be given a location in the project area, which makes them accessible via a Popup in the 3D Visualization. Clicking the Popup opens the Panel as part of the Viewer interface. Panels can also be opened via an Event, or even left entirely inaccessible.

Most panels render HTML-content, which means they can display text without additional formatting. Further layout and styling can be implemented by using HTML, CSS, and javascript. This enables Panels to also be opened in a web browser or included in the rendering of a Web interface.

The content of a number of types of Panels can be made more dynamic by using tags, or by using an Excel to compute its contents intelligently based on data in the project. This allows Panels to display information specific to a Panel or specific data in the Project, such as Attributes and Stakeholders.

Additionally, most panels can also support certain tags, which allows users to display information specific to a panel, such as the owner and attributes assigned to this panel.

When to use

There are a number of use-cases for which the use of Panels can be desirable. Most of those situations revolve around having custom interface elements, providing information or interaction for the end-user.

Information

Panels are primarily used to provide information to the end user. Any text or images they display, provide a source of (static) content in the session. Especially text and web panels fall into this category. Excel panels can also provide dynamic information on the current state of affairs in the session.

Interaction

Panels can also offer options to interact with the session. This can be done by means of predefined answers or through buttons defined by the HTML content, which send instructions to the project via the API. Depending on the amount of effort that went into its making, panels allow for very complex interaction in the 3D Visualization. All types of panels allow for the implementation of "answers", though text and Excel panels also work well with HTML buttons and input elements.

Calculation model

Another utility of panels is in the form of a hidden calculation model. The Excel spreadsheet attached to an Excel panel can contain a number of equations and formulations (queries) that yield a specific outcome. For example, in the case of a dynamic traffic model, information can be retrieved first (using SELECT-queries), after which these data are processed according the following specifications in the Excel file. The end product may be the calculated traffic intensities at various locations in the project area. Using UPDATE-queries, these results can subsequently adjusted the visibility of the Excel panel's Popup. Stakeholders will not notice anything of the underlying calculation model, except for its results (e.g., changing traffic intensities).

Web interface

Main article: Web interface

The Web interface can be enriched by adding a Panel to it with HTML, CSS and/or javascript code. The content of the Panel is directly injected into the Web interface.

Types

There are a number of types of panels available in the Tygron Platform.

Panel type Description Function Templatable
Text Panel Its contents are defined directly as text. The text is interpreted as HTML-content and directly displayed as content of the panel. If it is HTML-formatted text, it will be displayed according the specified styling. Text Template Panel
Web Panel Its contents are defined by a URL (web address). The web page to which is referred constitutes the content of the panel. When attempting to open the panel in a web browser, the web page will be accessed directly (i.e. not via the Tygron Platform).
Global Panel One or more globals are linked to this panel, allowing an end-user to edit the values of those globals during a session. The panel has a predefined structure in the Viewer interface and a fixed location. For each linked global an input field with that global's value is displayed. This value can be altered and submitted by the end-user in the session. The value of the global will be changed accordingly. This panel does not have an HTML-representation, hence it can neither be opened in a web browser nor can it be integrated in the web interface.
Excel Panel Its contents are defined by an Excel file. Each time data in the project or session are updated, the Excel file is recalculated. The results are interpreted as HTML-formatted text and displayed as such. Effectively, this panel is similar to a text panel, but rather than a static definition of the text content, the definition is dynamically generated through the spreadsheet. Excel Template Panel

Template Panels

Main article: Template Panel

Some Panels can also be generated through the use of Template Panels. These behave mostly like normal Panels but are not directly accessible to the end-user. Instead, based on a Template Panel, Panels can be generated automatically, related to specific data in the Project.

Properties

Panels have a number of properties, which can be configured in the editor. They define how the Panel is shown, and what is displayed.

General properties

The general properties of the Panel represent the overall configuration, excluding the actual content which is specific to the type of Panel itself.

Input field for the panel name.
Name
When a panel is opened, the name of the Panel is displayed at the top, informing the end-user what the panel is about.
Input fields for the panel location.
Interface location
The location of the Panel within the interface. The X-value represents the distance from the left-hand side of the Viewer interface. The Y-value represents the distance from the bottom of the Viewer interface.
Input fields for the panel size.
Dimensions
The size of the panel, so that it fits the content of the Panel. Ideally, a Panel should be large enough to fit the content without the need to scroll, but not so large as to leave space of the Panel empty.
Checkbox for the panel visibility.
Visibility
When the Panel has a location in the project area, it is represented by a Popup in the 3D Visualization. That Popup is either visible or not, based on this setting. Visibility is also accessible as an Attribute, allowing it to be set or modified through queries.
Checkbox for the panel attention.
Attention
When the Panel has a location in the project area, the resulting Popup can draw attention. If it does, arrows will appear in the Viewer interface of all Stakeholders who are allowed to see the Panel. Attention is also accessible as an Attribute, allowing it to be set or modified through queries.
Checkbox and drop-down for the assigned stakeholder(s).
Stakeholder
Either all Stakeholders are permitted to open a Panel, or only a single Stakeholder is permitted to open a Panel. If only a single Stakeholder is permitted to view the Panel, other Stakeholders will not see the Panel's Popup in the 3D Visualization, even if it is set to be visible. If a Stakeholder does open the Panel through another route, but does not have permission to view it, the user will see a notice that they are not allowed to view the Panel.
Pop-up model used for in-map visualization.
Popup model
The model of the Panel's Popup, which consists of both a 3D model and a 2D icon. The latter is used instead of the former for high Zoom Levels and the web interface. A selection of models is available in the drop-down menu.
Overlay activated when opening the panel.
Overlay
A panel, in itself, may not provide all the information the user wishes to show. If its content is related to specific geographic information that belongs to a certain overlay, the panel can be coupled to that overlay. Whenever the panel is opened in the future, the coupled overlay will be applied simultaneously.
Settings regarding the geographical location of the Popup.
Location in the project area
A Panel's Popup can be given a location in the project area. This can be done by selecting the button Set Point and using the brush to select its position. To remove it again from the project area, select the button Remove Point.

Content

Depending on the type of panel, it may have different adjustable elements that control its content.

Type Configuring Rendering Example
Text Enter a text in the Panel Text field to make it the content of the panel. If the content is HTML-formatted, the content of the panel will be formatted accordingly. Dynamically rendered content
The text content input field.
Web Enter a URL in the Web Link field and the assigned web page will be opened as content of the panel. A frame with the displayed website.
The URL input field.
Globals Select the globals that should be accessible through the panel. A predefined interface with input fields and a button so submit new values.
The globals selection list.
Excel Select the Excel spreadsheet which should calculate the content for this panel. Dynamically rendered content
The Excel selection button.

Dynamically rendered content

When the content of a Panel is dynamically rendered (i.e. when using a Text Panel or an Excel Panel), the Panel will output some string of text which will be displayed in the Panel to the end-user. Rendering of the content of a Panel occurs in three steps:

  1. The content of the Panel itself is processed as appropriate. Text is plain text, an Excel is recalculated, etc. This occurs regardless of whether an end-user is viewing the Panel or not.
  2. The content's output is processed for any tags in the content. These allow data to be inserted dynamically in fixed locations of the content. This occurs on-demand when a user views the Panel.
  3. The content with the tags processed is interpreted and displayed as HTML, allowing styling of content and structuring of information according to a flexible and well-known standard. Note that if the resulting content is plain-text, the content will be displayed as plain-text as well.

When a panel with HTML content is opened, any javascript script tags are interpreted as well, allowing for more complex client-side functionalities.

Attributes

Panels can have any number of arbitrary Attributes, which allows for the definition of additional data in an accessible and versatile fashion. Panels have a number of Attributes predefined, which fulfill a special function.

It's possible to access and modify the Attributes of Panels using queries.

Attribute Unit Description
ATTENTION boolean This is an attribute representation of the attention property and determines whether or not the panel draws attention.
COLOR Color The color of the top-down model of the popup designating the panel. This can be used to differentiate between multiple popups.
POPUP_TYPE nominal value The 3D model of the Panel's Popup and its top-down counterpart. Multiple models are offered by the Tygron Platform.
SCALE factor The size of the top-down model of the popup in the 3D Visualization. Note that the size is only updated when the visibility of the panel is updated. This can be done either by adjusting its location or toggling its visibility.
VISIBLE boolean This is an attribute representation of the visibility property and determines whether or not the panel is visible.
VISIBLE_TIMEFRAME integer The timeframe as of when the panel (popup) becomes visible during simulation. This attribute requires the attribute VISIBLE to be set to 1; if not, the popup will not show at all. The dynamic visibility of the panel (popup) is only apparent when simulating a weather effect and, therefore, will not work in a normal overlay simulation run. The visualization and division of timeframes is automatically derived from the Water Overlay present in the project.

Answers

A Panel can be given Answers. These are buttons that are added to a Panel and allow the end-user to close the Panel by selecting from the specified options. These Answers can be further supplemented through the inclusion of Events. When the user selects an Answer that has one or more Events attached to it, those Events will get fired (triggered) and will affect the Session accordingly.