Method and device for zooming by middle mouse button and scroll wheel
The invention discloses a method for zooming by a middle mouse button and a scroll wheel. The method includes detecting and pressing the middle mouse button, judging whether the scroll wheel scrolls or not, and if yes, recording two coordinates P1 and P2 on a straight line L passing the current coor...
Gespeichert in:
Hauptverfasser: | , , , , |
---|---|
Format: | Patent |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method for zooming by a middle mouse button and a scroll wheel. The method includes detecting and pressing the middle mouse button, judging whether the scroll wheel scrolls or not, and if yes, recording two coordinates P1 and P2 on a straight line L passing the current coordinate P0 of a mouse cursor, wherein the P1 and the P2 are arranged on two sides of the P0; judging the scrolling direction of the scroll wheel, if scrolling to the first direction, detecting that the middle mouse button rises, generating two slide events S1 and S2 by the P1 and the P2 as the starting points, and zooming the browsed content according to the slide events S1 and S2 and finishing this process, wherein the slide direction is deviated from the P0 along the straight line L if the slide event S1 takes the P1 as the starting point, and the slide direction is deviated from the P0 along the straight line L if the slide event S2 takes the P2 as the starting point; if scrolling to the second direction, triggering zoom out of the browsed content in the similar way. By adopting the method for zooming by the middle mouse button and the scroll wheel, zooming can be realized conveniently by the mouse, and user experience is improved. |
---|