From f6dc732a71564bae594240463b20e5e0a1b65a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sajn=C3=B3g?= Date: Sun, 19 Jun 2016 00:40:38 +0200 Subject: [PATCH] release 1.2.2 --- README.md | 19 ++++++++++++------- bower.json | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 22984f3..d8f83a9 100755 --- a/README.md +++ b/README.md @@ -124,18 +124,20 @@ Down below you can find list of all anchor-placement options. ####API -AOS object is exposed as global variable, for now there are only two methods available: +AOS object is exposed as a global variable, for now there are three methods available: - * init - * refresh + * `init` - initialize AOS + * `refresh` - recalculate all offsets and positions of elements (called on window resize) + * `refreshHard` - reinit array with AOS elements and trigger `refresh` (called on DOM changes that are related to `aos` elements) -Running: +Example execution: ```javascript AOS.refresh(); ``` -will recalculate all offsets and positions of elements. -It could be handy in older browsers which don't support mutation observer. -By default AOS is watching for DOM changes and if there are any new elements loaded asynchronously or when something is removed from DOM it calls refresh automatically. In older browsers like IE you might need to call `AOS.refresh()` by yourself. + +By default AOS is watching for DOM changes and if there are any new elements loaded asynchronously or when something is removed from DOM it calls `refreshHard` automatically. In browsers that don't support `MutationObserver` like IE you might need to call `AOS.refreshHard()` by yourself. + +`refresh` method is called on window resize and so on, as it doesn't require to build new store with AOS elements and should be as light as possible. ### Global settings @@ -306,6 +308,9 @@ If you have any questions, ideas or whatsoever, please let me know in `issues` o ## Changelog +#### 1.2.2 +- Fix AOS refreshing on asynchronously loaded elements + #### 1.2.1 - Add main file to package.json diff --git a/bower.json b/bower.json index f72358e..8538baa 100755 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aos", - "version": "1.2.1", + "version": "1.2.2", "homepage": "git://github.com/michalsnik/aos.git", "authors": [ "Michał Sajnóg " diff --git a/package.json b/package.json index 2bc6d60..4e5a2dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aos", - "version": "1.2.1", + "version": "1.2.2", "description": "Animate on scroll library", "homepage": "http://michalsnik.github.io/aos/", "author": "Michał Sajnóg ",