Diagram ScrollSettings module handles the scroller properties of the diagram
Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling
Defaults to { left: 15, right: 15, top: 15, bottom: 15 }
number
Specifies the interval (in milliseconds) between scroll triggers.
Defaults to 100
boolean
Enables or Disables the auto scroll option
Defaults to false
number
Defines the currentZoom value of diagram
Defaults to 1
number
Defines horizontal offset of the scroller
Defaults to 0
number
Defines the maximum zoom value of the scroller
Defaults to 30
number
Defines the minimum zoom value of the diagram
Defaults to 0.2
Defines the maximum distance to be left between the object and the edge of the page.
Defaults to { left: 0, right: 0, top: 0, bottom: 0 }
Defines the scrollable region of diagram.
Infinity - Diagram will be extended, when we try to scroll the diagram
<div id='diagram'></div>
let diagram: Diagram = new Diagram({
...
scrollSettings: { canAutoScroll: true, scrollLimit: 'Infinity',
scrollableArea : new Rect(0, 0, 300, 300), horizontalOffset : 0
},
...
});
diagram.appendTo('#diagram');
Defaults to ‘Diagram’
Defines the scrollable area of diagram. Applicable, if the scroll limit is “limited”.
Defaults to undefined
number
Defines vertical offset of the scroller
Defaults to 0
number
Allows to read the viewport height of the diagram
Defaults to 0
number
Allows to read the viewport width of the diagram
Defaults to 0
number
Specifies the percentage of scale value for each ZoomIn or ZoomOut functionality.
Defaults to 0.2