Base scroll area implementation.
npm install mag-component-scroll-areaScroll area component
==============





Scroll area is a component to build user interface, an instance of Component module.
``bash`
npm install mag-component-scroll-area
Add the constructor to the scope:
`js`
var ScrollArea = require('mag-component-scroll-area');
Own properties in addition to inherited from Component:
Name | Type | Default value | Description
-------------|-----------|---------------|-------------
step | number | 5 | step to scroll area in % of screen height
realHeight | number | 0 | real height of scroll area
viewHeight | number | 0 | visible height of area
topPosition | number | 0 | top position of scroll container
scroll | ScrollBar | null | associated ScrollBar component link |
Create scroll area instance:
`js`
var scrollArea = new ScrollArea({
scroll: scrollBar,
step: 5
});
Add scrollable content to the scroll area:
`js`
scrollArea.$body.innerText = 'Some long long long text to scroll..........';
Re-init of the component with new data:
`js`
scrollArea.init();
> There is a global var DEVELOP which activates additional consistency checks and protection logic not available in release mode.
If you have any problems or suggestions please open an issue
according to the contribution rules.
mag-component-scroll-area` is released under the MIT License.