Number of pages loaded initially is 2X MAX_PAGE_LOAD_RANGE
Hi,
Number of pages loaded when I'm in 1st page is 2X MAX_PAGE_LOAD_RANGE. Which is quiet heavy.
Is there any way to configure MAX_PAGE_LOAD_RANGE. (Without changing source)
This is the current configurations that I'm using.
viewer = Crocodoc.createViewer('.viewer', {
url: "./InTimeOktoober14/assets",
layout: Crocodoc.LAYOUT_VERTICAL_SINGLE_COLUMN,
enableTextSelection: true,
enableDragging: false,
useWindowAsViewport: true
});
viewer.on('pagefocus', function (event) {
console.log(event.data.page);
});
// This is how I got to know number of pages loaded.
viewer.on('pageload', function (event) {
console.log("loaded", event.data.page);
});
viewer.on('pageunload', function (event) {
console.log("unloaded", event.data.page);
});
viewer.load();
Please suggest, thanks in advance.
There are two parts to this issue:
- A possible bug: Number of pages loaded when in 1st page is 2X MAX_PAGE_LOAD_RANGE/MAX_PAGE_LOAD_RANGE_MOBILE.
- Request for having MAX_PAGE_LOAD_RANGE and MAX_PAGE_LOAD_RANGE_MOBILE as configurable values.
having the same issue.
Same issue. Did we get anywhere on this. I'm using version 0.11.0 and still got the same problem.
I tried looking into the code, but could not find the root cause. We just went ahead and divided our max load range by 2 :o
@vdclouis did you find a workaround then it sounds like? yeah I really would like this to just only request a few pages in range around whats visible at a time. it blocks the ui in my case from responding until all the initial requests are completed. 😦
or did you just download the source and change the constant variable in the dist?