Panorama

The Panorama widget is a full-screen widget that allows you to arrange items on a long horizontal canvas split into several views. Each view contains several items, and an end user navigates the views with the swipe gesture. The Panorama is often used as a navigation map on the first page of an application.

Included in: dx.mobile.js, dx.all.js
Module: ui/panorama
Export: default
Panorama interactive configuration
Copy Code
Copy to Codepen
$("#panorama").dxPanorama({
});

You can create the widget using one of the following approaches.

  • jQuery

    HTML
    <div id="panorama"></div>
    CSS
    #panorama {
        height: auto;
        position: absolute;
        top: 0; 
        bottom: 0;
        width: 100%;
    }
    JavaScript
    var panoramaItems = [{
        title: "Main courses",
        text: "First and second courses of a meal"
    }, {
        title: "Seafood",
        text: "Seafood: ocean and sea"
    },
        // . . .
    ];
    $(function () {
        $("#panorama").dxPanorama({
            items: panoramaItems,
            title: "Online Menu",
            backgroundImage: {
                url: '/here/goes/your/image.png',
                height: 600,
                width: 800
            }
        });
    });
  • AngularJS

    HTML
    <div ng-controller="DemoController">
        <div id="panorama" dx-panorama="{
            items: panoramaItems,
            title: 'Online Menu',
            backgroundImage: {
                url: '/here/goes/your/image.png',
                height: 600,
                width: 800
            }
        }"></div>
    </div>
    JavaScript
    angular.module('DemoApp', ['dx'])
        .controller("DemoController", function ($scope) {
            $scope.panoramaItems = [
                // ...   
            ];
        });        
  • Knockout

    HTML
    <div id="panorama" data-bind="dxPanorama: {
        items: panoramaItems,
        title: 'Online Menu',
        backgroundImage: {
            url: '/here/goes/your/image.png',
            height: 600,
            width: 800
        }
    }"></div>
    JavaScript
    var viewModel = {
        panoramaItems: [
            // ...
        ]
    };
    ko.applyBindings(viewModel);

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo Watch Video

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Panorama widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.

Default Item Template

This section lists the data source fields that are used in a default template for panorama items.

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is the list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also