Translates an item horizontally or vertically a given amount of pixels regardless of the current zoom value.
ImageViewer.prototype.translateItemScaleFactor = function(item, dx, dy, resetValues)
translateItemScaleFactor(item: ImageViewerItem, dx: number, dy: number, resetValues: boolean): void;
item
The item to translate. This parameter cannot be null.
dx
Number of pixels to translate the item horizontally.
dy
Number of pixels to translate the item vertically.
resetValues
true to reset the item state transformations, otherwise; false.
This is a helper method to quickly transform an item a specified amount of pixels regardless of the current zoom value.
This example will add a few items to the ImageViewer and then create a new interactive mode that transform the item using mouse or touch.
Run the demo. Click on any item and drag to translate, CTRL-click to zoom the item in and out.
Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:
function ImageViewer_TranslateItemScaleFactor(dx, dy) {
if (dx == 0 && dy == 0)
return;
this._imageViewer.translateItemScaleFactor(this._imageViewer.activeItem, -dx, -dy, true);
}
Products |
Support |
Feedback: translateItemScaleFactor Method (ImageViewer) - 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.