so after putting the ability to pan my graph, I have run into a bit of a problem. if i pan so much that my cursor exits the graph viewport it starts to scroll the opposite way. this is caused by a built in functionality to the jscrollpane. look on this page where they talk about how it works:



"Move the cursor over the image and press the cursor. Continuing to press the cursor, drag to a point outside the image and pause. The visible area of the image moves toward the cursor. This scroll-by-dragging functionality is enabled by the scroll pane, and with the JComponent API, but it is implemented by the custom component that displays the image."


how would i disable this?

asked 03 Nov '11, 07:20

bubshinkle's gravatar image

accept rate: 20%

This will be fixed in the next release by changing the top of mxGraphHandler.mouseDragged as follows:

public void mouseDragged(MouseEvent e)\n{\n  if (graphComponent.isAutoScroll())\n  {\n    graphComponent.getGraphControl().scrollRectToVisible(\n      new Rectangle(e.getPoint()));\n  }\n  //...\n





answered 04 Nov '11, 04:43

Gaudenz's gravatar image

accept rate: 39%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 03 Nov '11, 07:20

Seen: 2,665 times

Last updated: 04 Nov '11, 04:43