-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome & Safari Crash when adding 'step' #8
Comments
Well if the demo page is not crashing, then something is messed up with your code. I can take a look, but I'm going to need you to provide jsfiddle or something. |
If you apply Powerange to an element that is inside an element that has never been rendered; when the following code is called (https://github.com/abpetkov/powerange/blob/master/lib/horizontal.js#L30)
this.slider.offsetWidth will return 0 Then these 2 zeros are passed to
dimension is then set to 0. Then your for loop does; for i = 0; i <= 0(dimension); 0(i) + 0(interval) I don't know how you want to approach fixing this. Before you call the step() function you might do
The code will run as though step was never provided (this is not a great solution). One work around if you are calling Powerange against an element that is in a container that is yet to be rendered (ie. like in @danielravina case a backbone view) is to defer the powerange call until after the element has been rendered using setTimeout or equivalent like _.defer.
|
My code is:
I console.log all the functions and its crashing on line 1185
Please help! I like this plugin and without step it wont work for me...
Thanks!
The text was updated successfully, but these errors were encountered: