You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2007/09/21 05:45:33 UTC
svn commit: r577976 -
/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/BridgeEventSupport.java
Author: cam
Date: Thu Sep 20 20:45:33 2007
New Revision: 577976
URL: http://svn.apache.org/viewvc?rev=577976&view=rev
Log:
Really fix the mouse button bug.
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/BridgeEventSupport.java
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/BridgeEventSupport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/BridgeEventSupport.java?rev=577976&r1=577975&r2=577976&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/BridgeEventSupport.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/BridgeEventSupport.java Thu Sep 20 20:45:33 2007
@@ -378,7 +378,6 @@
}
*/
- short button = getButton(evt);
Point screenXY = evt.getScreenPoint();
// create the coresponding DOM MouseEvent
DocumentEvent d = (DocumentEvent)targetElement.getOwnerDocument();
@@ -397,7 +396,7 @@
screenXY.y,
clientXY.x,
clientXY.y,
- button,
+ (short) (evt.getButton() - 1),
(EventTarget)relatedElement,
modifiers);
@@ -422,21 +421,6 @@
relatedElement = context.getElement(relatedNode);
}
return relatedElement;
- }
-
- /**
- * Returns the mouse event button.
- *
- * @param evt the GVT GraphicsNodeMouseEvent
- */
- protected short getButton(GraphicsNodeMouseEvent evt) {
- short button = 1;
- if ((GraphicsNodeMouseEvent.BUTTON1_MASK & evt.getModifiers()) != 0) {
- button = 0;
- } else if ((GraphicsNodeMouseEvent.BUTTON3_MASK & evt.getModifiers()) != 0) {
- button = 2;
- }
- return button;
}
/**