mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
[Editor] Try to make the position of an edited FreeText the more accurated as possible
- Take into account the page translation, - Take into account the correct translation for the editor border, - Take into account the position of the first glyph in the annotation, - Take into account the rotation of the editor. Close #16633.
This commit is contained in:
parent
35202ec0f3
commit
944c68ee85
11 changed files with 424 additions and 59 deletions
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
exports.loadAndWait = (filename, selector) =>
|
||||
exports.loadAndWait = (filename, selector, zoom) =>
|
||||
Promise.all(
|
||||
global.integrationSessions.map(async session => {
|
||||
const page = await session.browser.newPage();
|
||||
|
@ -33,9 +33,11 @@ exports.loadAndWait = (filename, selector) =>
|
|||
});
|
||||
});
|
||||
|
||||
await page.goto(
|
||||
`${global.integrationBaseUrl}?file=/test/pdfs/${filename}`
|
||||
);
|
||||
let url = `${global.integrationBaseUrl}?file=/test/pdfs/${filename}`;
|
||||
if (zoom) {
|
||||
url += `#zoom=${zoom}`;
|
||||
}
|
||||
await page.goto(url);
|
||||
await page.bringToFront();
|
||||
await page.waitForSelector(selector, {
|
||||
timeout: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue