Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, June 7, 2017 1:10:01 PM(UTC)
huey.hoague

Groups: Registered
Posts: 18


When I call the SetInteractive function it is setting the below value.
imageViewer.defaultInteractiveMode = new lt.Controls.ImageViewerZoomToInteractiveMode();

When I do I get back the following error message
Unable to get property 'parentNode' of undefined or null reference

my other functions like below are working fine.
imageViewer.zoom(lt.Controls.ControlSizeMode.fitWidth, 1, imageViewer.defaultZoomOrigin);
imageViewer.reverse = false;
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, June 9, 2017 9:19:19 AM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 171

Was thanked: 5 time(s) in 5 post(s)

Please see the attached code. I am able to set the default interactive mode without issue.

HTML:
Code:
<!DOCTYPE html> 
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
   <meta charset="utf-8" /> 
   <title>LEADTOOLS Demo</title> 
   <!-- LEADTOOLS Libraries --> 
   <script type="text/javascript" src="Scripts/Leadtools.js"></script> 
   <script type="text/javascript" src="Scripts/Leadtools.Controls.js"></script> 
   <script type="text/javascript" src="Scripts/App.js"></script> 
</head> 
<body> 
   <!-- DIV to use as the container for the LEADTOOLS image viewer --> 
   <div id="imageViewerDiv" style="width: 600px; height: 600px; background-color: darkgray; float:left"></div> 
</body> 
</html> 


JavaScript:
Code:
var imageViewer;

window.onload = function () { 
	InitViewers();
	LoadImages();
}; 

function InitViewers(){
	var imageViewerDiv = document.getElementById("imageViewerDiv"); 
    var createOptions = new lt.Controls.ImageViewerCreateOptions(imageViewerDiv); 
	createOptions.useElements = true;
    imageViewer = new lt.Controls.ImageViewer(createOptions); 
	imageViewer.defaultInteractiveMode = new lt.Controls.ImageViewerPanZoomInteractiveMode();
}

function LoadImages(){
	imageViewer.imageUrl = "Images/Cannon.png"; 
}

File Attachment(s):
imageviewertest.zip (476kb) downloaded 136 time(s).

Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.129 seconds.