Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We are displaying a Visio 2013 document (.vsdx) in a Visio Web Access webpart on a SharePoint 2013 page.

The hyperlinks in the Visio file now reqire that the user click both Ctrl+Click to navigate to the url. I need the users to be able to follow the link using singleclick like they were used to in SharePoint 2010 with Visio Web Drawings. Does anyone know how this can be done in SP 2013/Visio 2013?

Regards ElinK

share|improve this question
    
did You found any solution to this problem. I´m facing the same issue :( Thanks, Daniel –  user17185 May 23 '13 at 9:51
    
Yup, I also need an answer to this :( –  CLockeWork Aug 30 '13 at 14:02
add comment

1 Answer

up vote 1 down vote accepted

I found a solution for this problem. I added JavaScript code to my page that ovverrides the click events of the shapes in the Visio Web Access webpart.

My script is not generic, it only works on pages where the Visio Web Access webpart id is "WebPartWPQ2" so you might have to change it, but I Guess it can help you anyway:

<script type="text/javascript"> 
Sys.Application.add_load(onApplicationLoad); 
var webPartElementID = "WebPartWPQ2"; // The HTML tag ID of the  

// Visio Web Access Web Part. 
var vwaControl; // The Visio Web Access Web Part. 
var vwaPage; // The current page. 
var vwaShapes; // The collection of all the shapes on the current page. 

function onApplicationLoad() 
{ 
try{  
vwaControl= new Vwa.VwaControl(webPartElementID); 
vwaControl.addHandler("diagramcomplete", onDiagramComplete); 
vwaPage = vwaControl.getActivePage(); 
// Firefox special 
if (vwaPage != null) 
{ 
vwaPage.setZoom(-1); 
vwaShapes = vwaPage.getShapes(); 
vwaControl.addHandler("shapeselectionchanged", onShapeSelectionChanged); 
} 
} 
catch(err){ 
alert(err); 
} 
} 

function onDiagramComplete() 
{ 
try{ 
vwaPage = vwaControl.getActivePage(); 
vwaPage.setZoom(-1); 
vwaShapes = vwaPage.getShapes(); 
textArea = document.getElementById('MouseOutput'); 
vwaControl.addHandler("shapeselectionchanged", onShapeSelectionChanged); 
} 
catch(err){ 
alert(err); 
} 
} 

onShapeSelectionChanged = function (source, args) 
{ 
// Don't process the shapeselectionchanged event raised when 
// the selection was cleared (for example, when the user tabs out of the drawing page). 
try{ 
if (vwaShapes.getItemById(args).getHyperlinks().length > 0) 
{ 
var link = vwaShapes.getItemById(args).getHyperlinks()[0].value; 
if (link !=null) 
{ 
location.href=link; 
} 
} 
} 
catch(err){ 
alert(err); 
} 
} 
</script>
share|improve this answer
    
Please also mark this as your accepted answer :) –  Robert Lindgren Feb 26 at 8:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.