ScrollSettingsModel
23 Sep 20251 minute to read
Interface for a class ScrollSettings
Properties
autoScrollBorder MarginModel
Defines the maximum distance to be left between the object and the scroll bar to trigger auto scrolling
autoScrollFrequency number
Specifies the interval (in milliseconds) between scroll triggers.
canAutoScroll boolean
Enables or Disables the auto scroll option
currentZoom number
Defines the currentZoom value of diagram
horizontalOffset number
Defines horizontal offset of the scroller
maxZoom number
Defines the maximum zoom value of the scroller
minZoom number
Defines the minimum zoom value of the diagram
padding MarginModel
Defines the maximum distance to be left between the object and the edge of the page.
scrollLimit ScrollLimit
Defines the scrollable region of diagram.
- Diagram - Enables scrolling to view the diagram content
- Infinity - Diagram will be extended, when we try to scroll the diagram
```html
```typescript
let diagram: Diagram = new Diagram({
...
scrollSettings: { canAutoScroll: true, scrollLimit: 'Infinity',
scrollableArea : new Rect(0, 0, 300, 300), horizontalOffset : 0
},
...
});
diagram.appendTo('#diagram');
scrollableArea Rect
Defines the scrollable area of diagram. Applicable, if the scroll limit is “limited”.
verticalOffset number
Defines vertical offset of the scroller
viewPortHeight number
Allows to read the viewport height of the diagram
viewPortWidth number
Allows to read the viewport width of the diagram
zoomFactor number
Specifies the percentage of scale value for each ZoomIn or ZoomOut functionality.