From PanoZona
InfoBubble |
Author | Marek Standio |
Module version | 1.3.2 |
Compatibility | SaladoPlayer 1.0 + |
InfoBubble allows creating simple hover tips from external image files or simple texts. InfoBubbles are shown/hidden on calling module exposed functions. Entire module can be dynamically activated or disactivated. When bubble is shown it follows cursor position and adjusts itself to fit completely within the panorama window.
Configuration structure
Configuration details
InfoBubble
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
path | S | - | - | path to swf file | Mandatory attribute. Value points to module swf file. |
settings
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
enabled | B | - | true | true, false | Determines if calling module exposed functions will cause bubbles to apear. |
onEnabled | S | - | - | action id | Action executed when module changes its state to enabled. |
onDisabled | S | - | - | action id | Action executed when module changes its state to disabled. |
margin | N | - | 15 | - | Number of pixels that determines minimal distance of bubles from border of panorama window. |
bubbles
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
showTween | O | transition | F | Linear.easeNone | avaible functions | Determines type of animation used when bubble is apearing. |
time | N | 0.25 | - | Duration in seconds of module bubble showing animation. |
hideTween | O | transition | F | Linear.easeNone | avaible functions | Determines type of animation used when bubble is disapearing. |
time | N | 0.25 | - | Duration in seconds of module bubble hiding animation. |
image
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
id | S | - | - | - | Mandatory attribute. Must be unique among other bubbles. |
angle | N | - | NaN | -180, 180 | Value in degrees describing where, relatvie to cursor position, bubble will be shown. When set to NaN it chooses best angle for given cursor position to fit bubble inside panorma window. When setting custom values, making this value positive or negative makes a big difference. If value is positive, when bubble meets panorama boundaries it tries to fit inside by rotating itself counterclockwise, analogically clockwise for negative value. For instance, for object located near right border of panorama window, if you want bubble to hover "on top" set value to "1" instead of "-1". |
path | S | - | - | path to image | Mandatory attribute. Path to image that is used as bubble. |
text
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
id, angle | - | - | - | - | See attributes in image. |
text | S | - | - | - | Text displayed inside text bubble. Lines can be separated with "[n]", content of this field can be alternatively set with CDATA node. |
style | S | - | - | style id | Optional attribute. Points to style that will be used to customize text bubble. If not used, default style will be applied. |
style
Attribute | Type | Sub-attribute | Type | Default | Values | Description |
id | S | - | - | - | Mandatory attribute. Must be unique among other styles. |
content | O | bubbleColor | N | #000000 | #000000 to #FFFFFF | Bubble background color. |
bubblePadding | N | 10 | - | Determines space between text and bubble border. |
fontFamily | S | Tahoma | Tahoma, Verdana, Courier | Font type of bubble text. |
fontSize | N | 15 | - | Font size of bubble text. |
fontColor | N | #FFFFFF | #000000 to #FFFFFF | Font color of bubble text. |
fontBold | B | true | true, false | Determines if font weight of bubble text is set to bold. |
borderSize | N | 3 | - | Thickness of bubble border. |
borderColor | N | #FFFFFF | #000000 to #FFFFFF | Color of bubble border. |
borderRadius | N | 15 | - | Radius of bubble corners. Higher value will make bubble corners more round. |
Functions
show
Type | Description | Function description |
S | bubble id | Sets bubble of given id visible. |
hide
Type | Description | Function description |
S | bubble id | Hides bubble of given id. |
setEnabled
Type | Description | Function description |
B | Value assigned to enabled attribute. | Sets enabled value. |
toggleEnabled
Type | Description | Function description |
- | - | Toggles enabled value. |