Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram jumps up on screen when clicking on node - ImageMap mode (Read 3244 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Diagram jumps up on screen when clicking on node - ImageMap mode
Jun 8th, 2012 at 8:51pm
Print Post  
Hi,

I have a diagram that allows users to click on a node/shape and modify the text in a popup dialog.
That works.
However, when the user first clocks on the shape, the whole diagram moves up vertically on the screen.  The onNodeClicked event doesn't fire until the user clicks again on the shape in its new location on the screen.

I have tried placing the diagram control inside an update panel, but without ant affect.

Any ideas?

Thanks

Jim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram jumps up on screen when clicking on node - ImageMap mode
Reply #1 - Jun 11th, 2012 at 8:28am
Print Post  
Hi,

In what browser does that happen?

Stoyan
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: Diagram jumps up on screen when clicking on node - ImageMap mode
Reply #2 - Jun 15th, 2012 at 3:52pm
Print Post  
Hi,

I have some additional information on this issue.
The problem seems to only occur if the diagram is vertically higher than the browser window - i.e., you need to use the browser's vertical scroll-bar to see the bottom most part of the diagram. 
The problem occurs in IE8, Chrome 19 and Safari 5.1.7 - it does NOT occur in Firefox 13.

I have attached 2 screenshots.  The 1st one shows the original state of the screen.
When I attempt to click on INC 1.4 Provide Incident Number, that's when the screen jumps vertically - as you can see from the 2nd screenshot.  You'll also notice that the popup dialog is showing content for INC 1.2 Verify User's Information, which means the click event actually fired off that node, not the one I was attempting to click on.

Diagrams with fewer swim lanes, that fit on the screen without a vertical scroll bar on the browser do NOT exhibit this problem, UNLESS I zoom in and force the scroll bar to appear.

Any ideas.  This is obviously very frustrating and not something we can deploy to our users.

Thanks in advance for any assistance.

Jim
  

NetDiagram_Issue_-_Screen_Jump_Before_-_15jun2012.png (Attachment deleted)
NetDiagram_Issue_-_Screen_Jump_After-_15jun2012.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram jumps up on screen when clicking on node - ImageMap mode
Reply #3 - Jun 18th, 2012 at 10:42am
Print Post  
Hi,

I cannot reproduce this. You can find attached my test project - try copying your settings to it to discover what causes the problem. That's just a modification of the Postback sample project that shows nodes' Tag values from the NodeClickedScript and uses browser's scrollbar instead of DiagramView's one.

Code
Select All
diagView.Height = diagView.DocToClient(diagram.Bounds).Height;

// create some nodes
int i = 0;
foreach (Shape shape in Shape.Shapes)
{
	if (shape.IsArrowhead)
		continue;

	ShapeNode node = diagram.Factory.CreateShapeNode(
		(i % 6) * 40, (i / 6) * 40, 20, 20, shape);
	node.Tag = node.Text = i.ToString();
	...

<form id="form1" runat="server">
	<asp:ScriptManager ID="ScriptManager1" runat="server" />
	<div>
		<ndiag:DiagramView runat="server"
			ID="diagView"
			ClientSideMode="ImageMap"
			ShowScrollbars="false"
			Width="750px" Height="600px"
			NodeClickedScript="onNodeClicked">
		</ndiag:DiagramView>
		<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" Width="253px" /></div>
</form>

<script type="text/javascript" language="javascript">
function onNodeClicked(sender, args)
{
	alert(args.getNode().getTag());
}
</script>

 



Stoyan
  

test_vscroll.zip (Attachment deleted)
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: Diagram jumps up on screen when clicking on node - ImageMap mode
Reply #4 - Jun 18th, 2012 at 9:12pm
Print Post  
Hi,

Your reply gave me an idea.
I have specified a Height for the DiagramView and enabled scrollbars.
This has resolved the issue, since I no longer have a vertical scrollbar on the browser.

Jim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint