DominikSerafin / vuebar

(🗃️ Archived) Vue 2 directive for custom scrollbar that uses native scroll behavior. Lightweight, performant, customizable and without dependencies. Used successfully in production on https://ggather.com
https://github.serafin.io/vuebar/
MIT License
648 stars 77 forks source link

Add support to max-height, max-width, min-height and min-width #88

Open Dev1lDragon opened 5 years ago

Dev1lDragon commented 5 years ago

in function initScrollbar add:

 ...
             state.el2.style.height = '100%';
            state.el2.style.maxHeight = 'inherit';
            state.el2.style.minHeight = 'inherit';
 ...
                     state.el2.style.width = '100%';
                    state.el2.style.maxWidth = 'inherit';
                    state.el2.style.minWidth = 'inherit';

and in destroyScrollbar add:

                state.el2.style.height = '';
                state.el2.style.maxHeight = '';
                state.el2.style.minHeight = 'inherit';   
                state.el2.style.width = '';
                state.el2.style.maxWidth = '';
                state.el2.style.minWidth = 'inherit';
DominikSerafin commented 5 years ago

Related: https://github.com/DominikSerafin/vuebar/issues/52