External HTML5 Canvas Element that can be used to re-direct the spy glass render.
Object.defineProperty(ImageViewerSpyGlassInteractiveMode.prototype, 'redirectCanvas',
get: function(),
set: function(value)
)
redirectCanvas: HTMLCanvasElement;
The external canvas
that can be used to re-direct the spy glass render. Default value is null.
ImageViewerSpyGlassInteractiveMode supports redirecting the render output to an external canvas
instead of the area under
the mouse in the viewer. When this value is set to a valid canvas
on the page, the interactive mode will use this canvas as the target for
the spy glass rendering instead of creating an internal instance and rendering the glass over the image viewer.
var panel = document.createElement("div");
panel.style.width = "300";
document.body.appendChild(panel);
var label = document.createElement("h5");
label.textContent = "Double click to switch between viewer and here";
panel.appendChild(label);
var redirectCanvas = document.createElement("canvas");
redirectCanvas.style.background = "gray";
redirectCanvas.style.visibility = "hidden";
panel.appendChild(redirectCanvas);
var mode = new lt.Controls.ImageViewerMagnifyGlassInteractiveMode();
mode.workStarted.add(function (sender, e) {
if (mode.redirectCanvas != null)
mode.redirectCanvas.style.visibility = "visible";
});
mode.workCompleted.add(function (sender, e) {
if (mode.redirectCanvas != null)
mode.redirectCanvas.style.visibility = "hidden";
});
mode.redirectCanvas = redirectCanvas;
panel.addEventListener("dblclick", function () {
if (mode.redirectCanvas == null)
mode.redirectCanvas = redirectCanvas;
else
mode.redirectCanvas = null;
});
this._imageViewer.interactiveModes.clearItems();
this._imageViewer.interactiveModes.beginUpdate();
this._imageViewer.interactiveModes.add(mode);
this._imageViewer.interactiveModes.endUpdate();
var _shapeComboBox = document.createElement("select");
document.body.appendChild(_shapeComboBox);
for (var shape in lt.Controls.ImageViewerSpyGlassShape) {
if (shape.toString() == "__typeName")
break;
var option = document.createElement("option");
option.textContent = shape.toString();
_shapeComboBox.appendChild(option);
_shapeComboBox.selectedIndex = mode.shape;
_shapeComboBox.addEventListener("change", function () {
mode.shape = _shapeComboBox.selectedIndex;
});
}
ImageViewerSpyGlassInteractiveMode Class
Products |
Support |
Feedback: redirectCanvas Property (ImageViewerSpyGlassInteractiveMode) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.3.21
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.