Page 1 of 1

Thumbnails order change event

Posted: Mon Dec 05, 2016 2:49 pm
by igor

We are building a document scanner in our ASP.NET application using your software. We would like to let our users to change order of scanned pages. The most convenient solution would be simple drag&drop. I know that your thumbnails snap-in supports it. I have a question regarding the RegisterOnThumbnailsOrderChanged event in the Javascript API. How can I know which exactly page has been moved? Can I somehow get information about old and new index of a moved page? If it is possible, could you provide me some sample code how to do this? Reference guide does not provide enough information.

Re: Thumbnails order change event

Posted: Thu Dec 08, 2016 12:00 pm
by Cedric
Hi Igor,

At the moment this information is not exposed, that's why the reference guide does not mention it, it is internally used to handle the page reordering though.

Because multiple pages can be selected and moved at the same time if the EnableMultipleThumbnailSelection property is set to true, you technically would have an array of page numbers and the page number destination this selection will go. In case of a single selection then the array would contain only one element.

We are going to expose those information in the next release, the RegisterOnThumbnailsOrderChanged event will provide the callback with an object containing source and destination numbers, of course the reference guide will be updated accordingly but it will be something like this:

Code: Select all

DocuViewareAPI.RegisterOnThumbnailsOrderChanged("DocuVieware1", function (data) {
	console.log(data.source); // the moved page (or pages in case of multiple selection)
	console.log(data.destination); // the destination the selection has been moved to

Re: Thumbnails order change event

Posted: Tue Dec 13, 2016 7:14 pm
by Cedric
It has been implemented in the new DocuVieware release we just published (2.0.48).
Here is the updated documentation: ... anged.html