Open markopaju opened 8 years ago
I'm not sure, I consider the sticky element and the container as two separate things with their own properties. But why would you say this?
I'm using the sticky (its a cool plugin) and run into an issue where the sticky was in a container but when you scrolled the page up and down the width for the sticky got really wide as nativeEl.offsetWidth calculated it wrong.
I think the only way you can fix this (though I'm not 100% certain) with the current code is to use the draw
method from the hl-sticky-element service. So you'll no longer be able to use the directive in that case.
function elementWidth() { return container ? container.clientWidth : nativeEl.offsetWidth; }
might be better