Represents a view that displays DiagramDocument objects.
Namespace: MindFusion.Diagramming.Controls
File: TabbedDiagramView.js
JavaScript Copy Code |
---|
// class |
Individual diagram pages can be activated through the tabs located at the top or at the bottom of the control. The appearance and behavior of the tab strip can be customized using various properties. The location and visibility of the strip is specified through the tabAlignment property. Its height can be changed via the tabsSize property. showAddButton and showNavigationButtons determine the visibility of the buttons for interactive tab creation and tab navigation respectively. showTabCloseButtons specifies whether the tabs can be closed interactively, by clicking on the small 'x' button displayed in each tab. allowReorder enables interactive tab rearrangement by mouse dragging.
TabbedDiagramView comes as s a part of the diagramming-controls npm package or the MindFusion.Diagramming.Controls namespace for UMD users.
For npm users simply import the diagramming-controls package:
JavaScript Copy Code |
---|
import * as Controls from '@mindfusion/diagramming-controls'; |
For UMD users, add references to files from distrbution's /umd folder using <script> tags. Note that the order of the scripts matters.
HTML Copy Code |
---|
<!-- for core Diagramming --> |
JavaScript Copy Code |
---|
var doc = new MindFusion.Diagramming.DiagramDocument(); |
or simply
JavaScript Copy Code |
---|
var diagramView = MindFusion.Diagramming.Controls.TabbedDiagramView.create( |
You can specify a title, iconUrl and titleColor for diagram pages by setting the corresponding properties.
Default images for the navigation buttons must be located in an ./icons folder. Alternatively, you can style the control with a predefined css theme, in which case the themes included in the distribution must be located in a ./themes folder and referenced in the head of the HTML document, e.g.
HTML / JavaScript Copy Code |
---|
<link rel="stylesheet" type="text/css" href="themes/business.css" /> |
MindFusion.Diagramming.DiagramView
MindFusion.Diagramming.Controls.TabbedDiagramView