d-oliveros / ngSmoothScroll

AngularJS directives for animating smooth scrolling to elements.
276 stars 110 forks source link

fix for container calculations #38

Open Traksewt opened 9 years ago

Traksewt commented 9 years ago

Calculating the end location was checking all parents. It should stop when it reaches the given container.

The window.internalHeight was interfering with the container animation exit calculations.

A threshold is added to stop the animation going on for a long time when the difference is less than a pixel.

Traksewt commented 8 years ago

adding package.json for webpack installation.

samsullivan commented 7 years ago

Thanks! This was much better than the fix I came up with (which didn't take into account any potential offsets).