- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing spreadsheet component for Java Swing. We have released our Java Swing Pack.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Pop Up Details
Read 722 times

dolfandon   Offline
Junior Member
**
Posts: 51
Gender: male
Northern Virginia


   
     
 
Pop Up Details
Jan 11th, 2017 at 7:47pm
 
Is there an example of how to display a modal popup with information about the double clicked node? I figured out how to get the node information but I can't get a popup to work on a page with the diagram control on it. Thanks.
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1055
Gender: male
tech.support


   
     
 
Re: Pop Up Details
Reply #1 - Jan 12th, 2017 at 9:39am
 
You probably need to convert from diagram coordinates to page ones. Try something like this, converting from MeasureUnit to pixels and adding the diagram's canvas offset in page -

Code:
function nodeDoubleClicked(sender, args)
{
        var rect = args.getNode().getBounds();
        var p = sender.docToClient(rect.topLeft());
        var controlPos = $(sender.get_element()).offset();
        $('#win').css('left', p.x + controlPos.left);
        $('#win').css('top', p.y + controlPos.top);
        $('#win').modal('show');
} 



Regards,
Slavcho
Mindfusion
 
 
 
IP Logged    
 
     

dolfandon   Offline
Junior Member
**
Posts: 51
Gender: male
Northern Virginia


   
     
 
Re: Pop Up Details
Reply #2 - Jan 12th, 2017 at 4:55pm
 
I'm assuming that thee should be a div with the id on win for this to work. Unfortunately it still didn't work for me. Do you have an example of a pop up on a diagram control?
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1055
Gender: male
tech.support


   
     
 
Re: Pop Up Details
Reply #3 - Jan 13th, 2017 at 7:52am
 
You can find an example here, draw a node and double click to see the pop-up aligned with the node -
http://mindfusion.eu/_samples/popup_test.zip
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print