The Vwa.VwaPage.getPosition function returns the same value regardless of the position of the page in the viewport

Article ID: 2414992 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

When you use the Vwa.VwaPage.getPosition function in JavaScript to return the position of a page in Microsoft SharePoint Server 2010, Vwa.VwaPage.getPosition returns the same value regardless of the position of the page in the view port. The function always returns the following value:

(-viewSize.width/2, -viewSize.height/2)

WORKAROUND

Programmers can work around this issue by accessing internal objects to calculate the expected result. For example, programmers can use code that resembles the following:

var viewPosition = vwa._control._renderingArea.getViewPosition();
var viewSize = vwa._control._renderingArea.getViewSize();
var pagePosition = {};
pagePosition.x = viewPosition.x - Math.ceil(viewSize.width / 2);
pagePosition.y = viewPosition.y - Math.ceil(viewSize.height / 2);

MORE INFORMATION

Microsoft has confirmed that this is an issue in the Visio Services API.

For more information, visit the following Microsoft Developer Network (MSDN) website:
Visio Services in SharePoint Server

Properties

Article ID: 2414992 - Last Review: February 12, 2011 - Revision: 2.0
APPLIES TO
  • Visio Services in Microsoft SharePoint Server 2010
  • Microsoft SharePoint Server 2010
Keywords: 
KB2414992

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com