12-22-2022, 06:59 AM
Script for Bar width and to adjust slider:
*This is to be written on the Connection script area of the respective component.
var len=changedItem.attributes.data.length;
var x=sdk.getWidget('timeline_DR' );
sdk.getWidget( 'timeline_DR').m_sliderheightratio=4.87; //sliderheight
if(len>15)
{
//x.m_showslider=true;
var ab=((15*100)/len);
x.m_sliderrange=ab; //sliderrange
}
else{
//x.m_showslider=false;
if(changedItem.attributes.data.length<16)
{
x.m_controlbarwidth =60;
x.m_barwidth =60;
}
else {
x.m_controlbarwidth =65;
x.m_barwidth = 65;
}
}
*This is to be written on the Connection script area of the respective component.
var len=changedItem.attributes.data.length;
var x=sdk.getWidget('timeline_DR' );
sdk.getWidget( 'timeline_DR').m_sliderheightratio=4.87; //sliderheight
if(len>15)
{
//x.m_showslider=true;
var ab=((15*100)/len);
x.m_sliderrange=ab; //sliderrange
}
else{
//x.m_showslider=false;
if(changedItem.attributes.data.length<16)
{
x.m_controlbarwidth =60;
x.m_barwidth =60;
}
else {
x.m_controlbarwidth =65;
x.m_barwidth = 65;
}
}