Added a simple edge detection for mouse hover.