Web Component: j-ViewBox
j-ViewBox
- keeps a fixed percentage height
- great usage for intranet applications
- supports
releasing
- optimized for jComponent
+v17
Configuration:
height
{Number} a percentage of heightdisabled
{Boolean} optional, can disable content with the layerparent
{String} optional, a container with fixed height, can bewindow
. Default value:parent
element.minheight
{Number} a minimal height in pixels (default:0
- disabled)scroll
{Boolean} enables vertical scrolling (default:false
- disabled)scrollbar
{Boolean} shows scrollbar (default:true
)delay
{Number}msec.
resizes the box again if the value is changed according to the path (default:100
)visibleY
{Boolean} still shows theY
scrollbar (default:false
)visibleX
{Boolean} still shows theX
scrollbar (default:false
)scrollto
{String} scrolls to top/bottom automatically if thepath
is changed (default:EMPTY
, can betop
orbottom
)margin
{Number} optional, a top/bottom margin together (supportsauto
which is counted fromoffset.top
, default:0
)marginxs
{Number} optional, a top/bottom margin together forxs
screen widthmarginsm
optional, a top/bottom margin together forsm
screen widthmarginmd
optional, a top/bottom margin together formd
screen widthmarginlg
optional, a top/bottom margin together forlg
screen widthinvisible
{Boolean} iftrue
then viewbox setsinvisible
class when is rendering (default:true
)scrollbarshadow
{Boolean} iftrue
then the custom scrollbars will contain vertical shadow (default:false
)initdelay
{Number} removes theinivisible
class after specified time (default:250
ms)centered {Boolean}
enables vertical and horitonzal centering for the content (default:false
)resizedelay {Number}
delay for resizing (default:200
)
Methods:
component.scrolltop(val)
scrolls Ycomponent.scrollbottom(val)
scrolls Y from bottom sidecomponent.resize()
resizes the container (it reacts onresize
events automatically)component.resizescrollbar()
resizes custom scrollbar (targeted for special cases)
Author
- Peter Širka petersirka@gmail.com
- License
Created
26. september 2018
Updated
21. january 2023
Version
v1
License
https://www.totaljs.com/license/
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com
