Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ScrollY (Read 2247 times)
billcollis
YaBB Newbies
*
Offline


I love mindfusion

Posts: 19
Location: Auckland, NZ
Joined: Jun 4th, 2011
ScrollY
Aug 5th, 2015 at 5:55am
Print Post  
I am not getting any values back from diagram.getScrollX() or getScrollY() after the diagram has been scrolled  They work fine in the animations demo,but my own code is embedded in some JQX tabs and splitters, any ideas??
Where might I find the raw values for the scroll bars? diagram.context.canvas.????
The diagram also has a zoomer control, zoom works but the zoomer buttons to control the scroll do nothing as well.
Bill
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ScrollY
Reply #1 - Aug 5th, 2015 at 7:45am
Print Post  
Do you mean you are getting undefined values? What happens if you trace through this code with debugger?

Code
Select All
if (diagram.scroller)
{
	var scrollOffset = new Point(
		diagram.scroller.scrollLeft,
		diagram.scroller.scrollTop);
}
else
{
	var scrollOffset = new Point(
		diagram.get_element().parentNode.scrollLeft,
		diagram.get_element().parentNode.scrollTop);
}
var scrollY = diagram.clientToDocOverflow(scrollOffset).y; 



Stoyan
  
Back to top
 
IP Logged
 
billcollis
YaBB Newbies
*
Offline


I love mindfusion

Posts: 19
Location: Auckland, NZ
Joined: Jun 4th, 2011
Re: ScrollY
Reply #2 - Aug 5th, 2015 at 6:10pm
Print Post  
Stoya
thank you
the values returned were 0
however while testing your code I realized that some html was corrupted in the div the diagram was in, it is all working now
sorry my unfamiliarity with JS and HTML
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint