LEADTOOLS Support
Imaging
Imaging SDK Questions
Unable to get property 'parentNode' error when trying to set ImageViewerZoomToInteractiveMode
#1
Posted
:
Wednesday, June 7, 2017 1:05:01 PM(UTC)
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;
#2
Posted
:
Friday, June 9, 2017 9:14:19 AM(UTC)
Groups: Manager, Tech Support, Administrators
Posts: 218
Was thanked: 12 time(s) in 12 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";
}
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.
LEADTOOLS Support
Imaging
Imaging SDK Questions
Unable to get property 'parentNode' error when trying to set ImageViewerZoomToInteractiveMode
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.