标签:style blog http java color io cti html
TODO:待编辑
将HTML5 / JavaScript查看器控件添加到HTML文档
<head> <script type="text/javascript"> run: function SiteLibrary_DefaultPage$run() { // Create the viewer var createOptions = new Leadtools.Controls.ImageViewerCreateOptions(‘imageViewerDiv‘, ‘myViewer‘); _viewer = new Leadtools.Controls.ImageViewer(createOptions); // Set the image URL - load using browswer support _viewer.set_imageUrl("http://demo.leadtools.com/images/jpeg/cactus.jpg"); }, </script> </head> <body> <div id="imageViewerDiv" /> </body>
添加一些事件处理程序
var buttonPanZoom = document.getElementById(‘buttonPanZoom‘); buttonPanZoom.addEventListener(‘click‘, function (e) { // Set the interactive mode to PanZoom var interactiveModePanZoom = new Leadtools.Controls.ImageViewerPanZoomInteractiveMode(); _viewer.set_defaultInteractiveMode(interactiveModePanZoom); }, false); var buttonMagnify = document.getElementById(‘buttonMagnify‘); buttonMagnify.addEventListener(‘click‘, function (e) { // Set the interactive mode to MagnifyingGlass var interactiveModeMagGlass = new Leadtools.Controls.ImageViewerMagnifyGlassInteractiveMode(); interactiveModeMagGlass.set_borderThickness(5); _viewer.set_defaultInteractiveMode(interactiveModeMagGlass); }, false);
LEADTOOLS HTML5&Javascript 入门笔记,布布扣,bubuko.com
LEADTOOLS HTML5&Javascript 入门笔记
标签:style blog http java color io cti html
原文地址:http://www.cnblogs.com/alexsun/p/3873026.html