fix hover state by emitting mouseleave when option is no longer active (fixes #1)
This commit is contained in:
@@ -19,6 +19,9 @@ AFRAME.registerComponent('active-color', {
|
||||
el.setAttribute('material', 'color', this.data.color);
|
||||
} else {
|
||||
el.setAttribute('material', 'color', this.defaultColor);
|
||||
if (el.components.animation__mouseleave) {
|
||||
setTimeout(() => { el.emit('mouseleave', null, false); });
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user