janpaepke / ScrollMagic

The javascript library for magical scroll interactions.
http://ScrollMagic.io
Other
14.8k stars 2.17k forks source link

Pinning and AngularJS #389

Open merzikain opened 8 years ago

merzikain commented 8 years ago

I'm working on a home page for an AngularJS site and using ScrollMagic for the "neat shit" I've been asked to do on the page. It works great except that I'm getting errors when I add pins.

TypeError: Cannot read property 'toUpperCase' of undefined (angular.js:11699) and TypeError: Cannot read property 'nodeName' of undefined (angular.js:11699)

I'm have no idea why it's doing that and the errors don't appear to be affecting any functionality. However, I hate having errors of any kind so I'm hoping this is something you're aware of and have an easy fix (or any fix really).

I'm using: AngularJS 1.3.16 w/

jQuery 2.1.4 TweenMax 1.14.2 ScrollMagic 2.0.5 w/

Example of pin code: var frame2Pin = new ScrollMagic.Scene({triggerElement: "#frame2-trigger", triggerHook:0, offset:'-50%', duration:'50%'}) .setPin("#frame2-content") .addIndicators() .addTo(smCtrl);

homerjam commented 8 years ago

Shameless plug: https://github.com/homerjam/angular-scroll-magic