Usage
Signature:
interface FilmStripElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { FilmStripElement } from "ojs/ojfilmstrip";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojfilmstrip";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
-
Default
-
The <oj-film-strip> element lays out its children in a single row or column across logical pages and allows navigating through them.
-
contextMenu
-
The contextMenu slot is set on the
oj-menu
within this element. This is used to designate the JET Menu that this component should launch as a context menu on right-click, Shift-F10, Press & Hold, or component-specific gesture. If specified, the browser's native context menu will be replaced by the JET Menu specified in this slot.The application can register a listener for the Menu's ojBeforeOpen event. The listener can cancel the launch via event.preventDefault(), or it can customize the menu contents by editing the menu DOM directly, and then calling refresh() on the Menu.
To help determine whether it's appropriate to cancel the launch or customize the menu, the ojBeforeOpen listener can use component API's to determine which table cell, chart item, etc., is the target of the context menu. See the JSDoc of the individual components for details.
Keep in mind that any such logic must work whether the context menu was launched via right-click, Shift-F10, Press & Hold, or component-specific touch gesture.
- Deprecated:
-
Since Description 13.0.0
This web component no longer supports launching a context menu.
Attributes
-
arrow-placement :"adjacent"|"overlay"
-
Specify the placement of the navigation arrows.
- Default Value:
"adjacent"
Supported Values:
Value Description adjacent
Arrows are outside, adjacent to the filmStrip content. The arrows are still inside the bounds of the filmStrip element itself. overlay
Arrows are inside, overlaying the filmStrip content. Names
Item Name Property arrowPlacement
Property change event arrowPlacementChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-arrow-placement-changed
-
arrow-visibility :"visible"|"hidden"|"hover"|"auto"
-
Specify the visibility of the navigation arrows.
- Default Value:
"auto"
Supported Values:
Value Description auto
Behaves as if the value were visible
when thearrow-placement
attribute is set toadjacent
, andhover
when thearrow-placement
attribute is set tooverlay
.hidden
Arrows are hidden. hover
Arrows are visible when the mouse is over the filmStrip, and hidden otherwise. visible
Arrows are visible. Names
Item Name Property arrowVisibility
Property change event arrowVisibilityChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-arrow-visibility-changed
-
current-item :{id?: string, index?: number}
-
Specify the child item whose logical page should be displayed. The position of the item on the logical page is not guaranteed.
This attribute can be set to an object containing either string id of the item or numeric 0-based index of the item or both. If the object contains both string id and numeric index, string id takes precedence.
FilmStrip will automatically update the value of this attribute when the logical page is changed to be the first item on the new logical page. When the value is updated automatically, it will be an object containing numeric index and string id, if available.
When the element is resized, FilmStrip will preserve the value of this attribute to show the new logical page on which the item is located.
- Default Value:
{"index" : 0}
- Supports writeback:
true
Properties:
Name Type Argument Description id
string <optional>
string id of the item index
number <optional>
numeric 0-based index of the item Names
Item Name Property currentItem
Property change event currentItemChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-current-item-changed
-
looping :"off"|"page"
-
Specify the navigation looping behavior.
- Default Value:
"off"
Supported Values:
Value Description off
Navigation is bounded between first and last page and can't go any further in the direction of navigation. page
Navigation is not bounded between first and last page and can go further in the direction of navigation. This lets the user loop around from first page to last page, or from last page to first page. Names
Item Name Property looping
Property change event loopingChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-looping-changed
-
max-items-per-page :number
-
Specify the maximum number of child items to show in a logical page. A value of 0 (the default) means that FilmStrip will show as many items per logical page as will fit based on the element and item sizes.
FilmStrip may show fewer than the specified number of items when
max-items-per-page
is set to a value other than 0 if the element size is smaller than what would be required to show that many items.- Default Value:
0
- See:
Names
Item Name Property maxItemsPerPage
Property change event maxItemsPerPageChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-max-items-per-page-changed
-
orientation :"horizontal"|"vertical"
-
Specify the orientation of the FilmStrip.
- Default Value:
"horizontal"
Supported Values:
Value Description horizontal
Orient the FilmStrip horizontally. vertical
Orient the FilmStrip vertically. Names
Item Name Property orientation
Property change event orientationChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-orientation-changed
-
translations :object|null
-
A collection of translated resources from the translation bundle, or
null
if this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.If the component does not contain any translatable resource, the default value of this attribute will be
null
. If not, an object containing all resources relevant to the component.If this component has translations, their documentation immediately follows this doc entry.
Names
Item Name Property translations
Property change event translationsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-translations-changed
-
(nullable) translations.label-acc-arrow-next-page :string
-
Accessible label for the next page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Select Next to display next page"
- Since:
- 1.1.0
Names
Item Name Property translations.labelAccArrowNextPage
-
(nullable) translations.label-acc-arrow-previous-page :string
-
Accessible label for the previous page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Select Previous to display previous page"
- Since:
- 1.1.0
Names
Item Name Property translations.labelAccArrowPreviousPage
-
(nullable) translations.label-acc-film-strip :string
-
Accessible page information label for the filmstrip element.
See the translations attribute for usage examples.
- Default Value:
"Displaying page {pageIndex} of {pageCount}"
- Since:
- 5.1.0
Names
Item Name Property translations.labelAccFilmStrip
-
(nullable) translations.tip-arrow-next-page :string
-
Tooltip for the next page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Next"
- Since:
- 1.1.0
Names
Item Name Property translations.tipArrowNextPage
-
(nullable) translations.tip-arrow-previous-page :string
-
Tooltip for the previous page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Previous"
- Since:
- 1.1.0
Names
Item Name Property translations.tipArrowPreviousPage
Methods
-
getItemsPerPage : {number}
-
Get the actual number of items shown per logical page.
The value returned by this method may be different from the value of the
maxItemsPerPage
property.- See:
Returns:
The actual number of items shown per logical page.
- Type
- number
-
getPagingModel : {PagingModel}
-
Get the PagingModel created and used by the FilmStrip. The PagingModel provides information about the FilmStrip's logical pages and a way to programmatically change pages.
Returns:
The instance of the PagingModel created and used by the FilmStrip.
- Type
- PagingModel
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty. The return type will be the same as the type of the property as specified in this API document. If the method is invoked with an incorrect property/subproperty name, it returns undefined.
Parameters:
Name Type Description property
string The property name to get. Supports dot notation for subproperty access. - Since:
- 4.0.0
Returns:
- Type
- any
Example
let subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2');
-
refresh : {void}
-
Refreshes the visual state of the FilmStrip. JET elements require a
refresh()
after the DOM is programmatically changed underneath the element.This method does not accept any arguments.
Returns:
- Type
- void
-
setProperties(properties) : {void}
-
Performs a batch set of properties. The type of value for each property being set must match the type of the property as specified in this API document.
Parameters:
Name Type Description properties
Object An object containing the property and value pairs to set. - Since:
- 4.0.0
Returns:
- Type
- void
Example
myComponent.setProperties({"prop1": "value1", "prop2.subprop": "value2", "prop3": "value3"});
-
setProperty(property, value) : {void}
-
Sets a property or a subproperty (of a complex property) and notifies the component of the change, triggering a [property]Changed event. The value should be of the same type as the type of the attribute mentioned in this API document.
Parameters:
Name Type Description property
string The property name to set. Supports dot notation for subproperty access. value
any The new value to set the property to. - Since:
- 4.0.0
Returns:
- Type
- void
Example
myComponent.setProperty('complexProperty.subProperty1.subProperty2', "someValue");