Skip to content

Commit

Permalink
Merge pull request ctrl-freaks#62 from ctrl-freaks/nf/destroy
Browse files Browse the repository at this point in the history
Fix destroy method, add destroy behavior to React and Vue components
  • Loading branch information
nickforddev authored Mar 15, 2020
2 parents b98d91a + e516f8d commit 1da2516
Show file tree
Hide file tree
Showing 48 changed files with 26,195 additions and 5,588 deletions.
2 changes: 1 addition & 1 deletion docs/freezeframe.min.js

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,31 @@
});
</script>

<!-- Example 5 -->

<p>destroy, remove event listeners.</p>

<button class="destroy">destroy</button>

<img
class="my-class-5"
src="https://static1.squarespace.com/static/51c748abe4b0c275d0aa86bf/55f96e21e4b0f86680e762dc/5615846be4b042d6d89a94ee/1444251161903/?format=1000w"
/>

<script>
const destroyable = new Freezeframe('.my-class-5', {
overlay: true
});

document
.querySelector('.destroy')
.addEventListener('click', () => {
console.log('click')
destroyable.destroy();
});
</script>


<p>cinemagraphs by <a href="http://www.cinemagraphs.com/">cinemagraphs.com</a>

</body>
Expand Down
10 changes: 5 additions & 5 deletions docs/react/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files": {
"main.css": "/freezeframe.js/react/static/css/main.85c39dd4.chunk.css",
"main.js": "/freezeframe.js/react/static/js/main.7b514271.chunk.js",
"main.js.map": "/freezeframe.js/react/static/js/main.7b514271.chunk.js.map",
"main.js": "/freezeframe.js/react/static/js/main.bd8ad9c7.chunk.js",
"main.js.map": "/freezeframe.js/react/static/js/main.bd8ad9c7.chunk.js.map",
"runtime~main.js": "/freezeframe.js/react/static/js/runtime~main.0b442b39.js",
"runtime~main.js.map": "/freezeframe.js/react/static/js/runtime~main.0b442b39.js.map",
"static/js/2.7ff973e6.chunk.js": "/freezeframe.js/react/static/js/2.7ff973e6.chunk.js",
"static/js/2.7ff973e6.chunk.js.map": "/freezeframe.js/react/static/js/2.7ff973e6.chunk.js.map",
"static/js/2.2e82958c.chunk.js": "/freezeframe.js/react/static/js/2.2e82958c.chunk.js",
"static/js/2.2e82958c.chunk.js.map": "/freezeframe.js/react/static/js/2.2e82958c.chunk.js.map",
"index.html": "/freezeframe.js/react/index.html",
"precache-manifest.a631062c8219867bc2906decaa332deb.js": "/freezeframe.js/react/precache-manifest.a631062c8219867bc2906decaa332deb.js",
"precache-manifest.57bd0650cc53ecae1a77455f34639c55.js": "/freezeframe.js/react/precache-manifest.57bd0650cc53ecae1a77455f34639c55.js",
"service-worker.js": "/freezeframe.js/react/service-worker.js",
"static/css/main.85c39dd4.chunk.css.map": "/freezeframe.js/react/static/css/main.85c39dd4.chunk.css.map"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/react/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/freezeframe.js/react/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/freezeframe.js/react/manifest.json"/><title>React App</title><link href="/freezeframe.js/react/static/css/main.85c39dd4.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],c[t]&&i.push(c[t][0]),c[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return p.push.apply(p,u||[]),a()}function a(){for(var e,r=0;r<p.length;r++){for(var t=p[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==c[u]&&(n=!1)}n&&(p.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},c={1:0},p=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/freezeframe.js/react/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/freezeframe.js/react/static/js/2.7ff973e6.chunk.js"></script><script src="/freezeframe.js/react/static/js/main.7b514271.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/freezeframe.js/react/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/freezeframe.js/react/manifest.json"/><title>React App</title><link href="/freezeframe.js/react/static/css/main.85c39dd4.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],c[t]&&i.push(c[t][0]),c[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return p.push.apply(p,u||[]),a()}function a(){for(var e,r=0;r<p.length;r++){for(var t=p[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==c[u]&&(n=!1)}n&&(p.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},c={1:0},p=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/freezeframe.js/react/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/freezeframe.js/react/static/js/2.2e82958c.chunk.js"></script><script src="/freezeframe.js/react/static/js/main.bd8ad9c7.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "495d9faa7ae55ebf00aaa0875936f072",
"revision": "780a6128606f5292acc51f41c47c5b2b",
"url": "/freezeframe.js/react/index.html"
},
{
"revision": "48e370032bab058106b7",
"revision": "bc1f1eba0fbaab34af7e",
"url": "/freezeframe.js/react/static/css/main.85c39dd4.chunk.css"
},
{
"revision": "bb8a4a0c05535095512e",
"url": "/freezeframe.js/react/static/js/2.7ff973e6.chunk.js"
"revision": "42509e713dd50609e6b3",
"url": "/freezeframe.js/react/static/js/2.2e82958c.chunk.js"
},
{
"revision": "48e370032bab058106b7",
"url": "/freezeframe.js/react/static/js/main.7b514271.chunk.js"
"revision": "bc1f1eba0fbaab34af7e",
"url": "/freezeframe.js/react/static/js/main.bd8ad9c7.chunk.js"
},
{
"revision": "84cb35a47ccb251394a0",
Expand Down
4 changes: 2 additions & 2 deletions docs/react/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/freezeframe.js/react/precache-manifest.a631062c8219867bc2906decaa332deb.js"
"/freezeframe.js/react/precache-manifest.57bd0650cc53ecae1a77455f34639c55.js"
);

self.addEventListener('message', (event) => {
Expand All @@ -35,5 +35,5 @@ workbox.precaching.precacheAndRoute(self.__precacheManifest, {});

workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/freezeframe.js/react/index.html"), {

blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/],
blacklist: [/^\/_/,/\/[^/]+\.[^/]+$/],
});
2 changes: 2 additions & 0 deletions docs/react/static/js/2.2e82958c.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/react/static/js/2.2e82958c.chunk.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/react/static/js/2.7ff973e6.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/react/static/js/2.7ff973e6.chunk.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions docs/react/static/js/main.7b514271.chunk.js

This file was deleted.

Loading

0 comments on commit 1da2516

Please sign in to comment.