progressStep icon indicating copy to clipboard operation
progressStep copied to clipboard

Progress Bar Keeps Moving Down On `refreshLayout` Calls

Open theonewolf opened this issue 10 years ago • 3 comments

Repeated calls to refreshLayout continuously moves the progress bar down.

Commenting out this line stops the bar from moving down continuously:

https://github.com/mateagar/progressStep/blob/master/progressStep.js#L245

Is that line necessary? Do the height and the width need to be updated on every function call?

For some reason, the height keeps growing in size.

theonewolf avatar Jun 22 '15 02:06 theonewolf

Adjusting the height and width of the control is one of the primary purposes of the refreshLayout() method. That said, I'm not sure why doing so would increase the height incrementally with each call - perhaps it is a browser bug.

Do you need to call refreshLayout() so often? Typically this would be called once when the progress bar is displayed, and then not again unless the layout changes fundamentally.

mateagar avatar Jun 22 '15 11:06 mateagar

Thanks for responding so quickly!

So we have a use case which wants to add and remove steps dynamically. Right now I was just removing steps. This results in multiple calls to refreshLayout.

I was removing them manually and then refreshing the layout. Everything worked as expected, except the entire graph moved down 5 pixels on every refresh.

Even if I don't modify the array/DOM/Raphael objects, the simple action of calling the function refreshLayout causes the move down 5 pixels.

I'm using Google Chrome 32-bit (43.0.2357.124) on Windows 8.1 64-bit.

theonewolf avatar Jun 22 '15 16:06 theonewolf

hi bro, thank a lot for source. now, i need you to help me, please. I can't change default width. Please help me. Thank

comrade3X avatar Jun 23 '16 08:06 comrade3X