Thumbnails order change event

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
User avatar
igor
Posts: 19
Joined: Fri Oct 28, 2016 10:42 pm

Thumbnails order change event

Post by igor » Mon Dec 05, 2016 2:49 pm

Hello,

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.

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: Thumbnails order change event

Post by Cedric » Thu Dec 08, 2016 12:00 pm

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
});

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: Thumbnails order change event

Post by Cedric » Tue Dec 13, 2016 7:14 pm

It has been implemented in the new DocuVieware release we just published (2.0.48).
Here is the updated documentation: https://www.docuvieware.com/guides/aspn ... anged.html

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest