diff --git a/package.json b/package.json index b0cc49f..0ce8c87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-animated-menus", - "version": "1.0.7", + "version": "1.0.11", "description": "React component that mounts three dot button that morphs into a menu by clicking on it.", "main": "./lib/index.js", "license": "MIT", diff --git a/src/components/Menu.js b/src/components/Menu.js index 1048bc7..49ea446 100644 --- a/src/components/Menu.js +++ b/src/components/Menu.js @@ -51,19 +51,19 @@ class App extends Component { if(event.target.closest('#'+id) && !open) { this.open = true; - animate(); + this.animate(); } if(!event.target.closest('#'+id) && open) { this.open = false; - animate(); + this.animate(); } }); } animate() { - const id = this.state.id; + const id = this.id; //Targets that will be triggered var targetDots = document.querySelectorAll('#'+id+' .Menu_dot'); @@ -227,7 +227,7 @@ class App extends Component { const styleFont = {fontSize: style.width}; return ( -
+