Bug fixes
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-animated-menus",
|
"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.",
|
"description": "React component that mounts three dot button that morphs into a menu by clicking on it.",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -51,19 +51,19 @@ class App extends Component {
|
|||||||
|
|
||||||
if(event.target.closest('#'+id) && !open) {
|
if(event.target.closest('#'+id) && !open) {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
animate();
|
this.animate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!event.target.closest('#'+id) && open) {
|
if(!event.target.closest('#'+id) && open) {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
animate();
|
this.animate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
animate() {
|
animate() {
|
||||||
const id = this.state.id;
|
const id = this.id;
|
||||||
|
|
||||||
//Targets that will be triggered
|
//Targets that will be triggered
|
||||||
var targetDots = document.querySelectorAll('#'+id+' .Menu_dot');
|
var targetDots = document.querySelectorAll('#'+id+' .Menu_dot');
|
||||||
@ -227,7 +227,7 @@ class App extends Component {
|
|||||||
const styleFont = {fontSize: style.width};
|
const styleFont = {fontSize: style.width};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={style} id={this.state.id} className="Menu Menu_closed">
|
<div style={style} id={this.id} className="Menu Menu_closed">
|
||||||
<div className="Menu_dotBox">
|
<div className="Menu_dotBox">
|
||||||
<div style={styleDot} className="Menu_dot Menu_dotA">
|
<div style={styleDot} className="Menu_dot Menu_dotA">
|
||||||
<div className="Menu_button" style={styleFont} onClick={this.props.food.a.action}>
|
<div className="Menu_button" style={styleFont} onClick={this.props.food.a.action}>
|
||||||
|
Reference in New Issue
Block a user