angular-sticky icon indicating copy to clipboard operation
angular-sticky copied to clipboard

elementWidth()

Open markopaju opened this issue 8 years ago • 3 comments

function elementWidth() { return container ? container.clientWidth : nativeEl.offsetWidth; }

might be better

markopaju avatar Oct 20 '16 12:10 markopaju

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?

harm-less avatar Oct 20 '16 12:10 harm-less

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.

markopaju avatar Oct 20 '16 15:10 markopaju

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.

harm-less avatar Dec 11 '17 08:12 harm-less