
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
angular-scroll-magic
Advanced tools
An angular directive for ScrollMagic, define pins and tweens in markup
An angular directive for ScrollWizardry, define pins and tweens in markup
http://homerjam.github.io/angular-scroll-magic/
0.2.0: Now using scrollwizardy instead of ScrollMagic
0.1.0: BREAKING Directives now using bindToController and isolated scope this provides better support for defining params in controllers. You may need to put quotes around strings in your templates.
Install via npm npm i -S angular-scroll-magic
Include the necessary files and dependencies (ScrollWizardry, GSAP) on your page or in your build process
Add hj.scrollMagic to app's module dependencies
Turn on indicators to help during development
// In your app config
scrollMagicProvider.addIndicators = true;
Create a scene, by applying the sm-scene directive this determines the timing for the desired behaviour
<div sm-scene="sceneId" duration="500" offset="100" trigger-hook="0.75"></div>
sm-scene (string) : scene identifiertrigger-element [(element|selector)] : defaults to the directive elementduration [(integer|string)] : if using a string with a % symbol this will be calculated against viewport heightoffset [(integer|string)] : if using a string with a % symbol this will be calculated against the height of the trigger element (if specified) or documenttrigger-hook [(float)] : this determines the position of the trigger point relative to the viewport<div sm-tween="sceneId" duration="1" from-vars="{left: '100%'}" to-vars="{left: '0%'}"></div>
sm-tween (string) : the identifier of the scene (trigger) to useduration (number) : duration of tween relative to length of scenefrom-vars [(object)]to-vars|vars (object) : options used by GSAP such as CSS propertiespersist (boolean) : persist directive between life times<div sm-class-toggle="sceneId" classes=""></div>
sm-class-toggle (string) : the identifier of the scene (trigger) to useclasses (string) : the classes to add/removepersist (boolean) : persist directive between life times<div sm-pin="sceneId"></div>
sm-pin (string) : the identifier of the scene (trigger) to usepersist (boolean) : persist directive between life timesAllows access to scenes from your controllers.
<!-- Define scene in your template -->
<div sm-scene="'myScene'"></div>
// Add an observer which will trigger on initialisation of the scene
ScrollMagicService.onSceneAdded('myScene', function(scene) {
// do stuff with `scene`
});
// Or after initialisation
var scene = ScrollMagicService.getScene('myScene');
FAQs
An angular directive for ScrollMagic, define pins and tweens in markup
We found that angular-scroll-magic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.