BUG: Marquee Zoom offset and erratic Ctrl + Scroll Zoom on rotated CAD-generated PDF files

オープン
#696 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
react, typescript
領域
frontend

調査の方向性

Start by reproducing both symptoms with the attached CAD PDF (page rotation metadata) in the viewer, since the issue gives steps but names no file. Look for where marquee-zoom drag rectangles and Ctrl+scroll wheel deltas are converted into page coordinates, and how page rotation is applied there; issue #695 (callout placement on rotated pages) is flagged as the same transformation problem. Done means marquee zoom lands on the dragged area and Ctrl+scroll zooms in smooth, predictable steps on that PDF.

索引モデルが issue の本文から書いたものです。

説明

Describe the Bug

There are two related zoom issues when viewing specific PDF files. This behavior occurs on PDF files generated from CAD software that contain page rotation metadata (e.g., pages that appear landscape but have a built-in rotation angle).

  1. Marquee Zoom Offset: When using the Marquee Zoom tool to zoom into a specific selected area, the viewer zooms into a completely different, incorrect area on the page. The coordinate mapping seems shifted or rotated.
  2. Erratic Ctrl + Scroll Zoom: Using Ctrl + Scroll to zoom in/out is not smooth at all. The zoom level jumps aggressively and feels way too fast/sensitive.

Note: This seems closely related to the coordinate transformation issues on rotated PDFs, similar to the Callout issue reported in #695.

Steps to Reproduce

For Marquee Zoom:

  1. Open the attached CAD PDF file in the viewer.
  2. Select the Marquee Zoom tool.
  3. Click and drag a box around a specific area you want to zoom into.
  4. Observe that the view jumps to a different portion of the page instead of the selected area.

For Ctrl + Scroll Zoom:

  1. Hold Ctrl and scroll the mouse wheel to zoom in or out.
  2. Observe that the zoom is extremely sensitive, choppy, and jumps in large increments.

Expected Behavior

  • Marquee Zoom: The viewer should precisely zoom into the area selected by the drag box, correctly accounting for any page rotation metadata.
  • Ctrl + Scroll Zoom: The zoom transition should be smooth, predictable, and at a reasonable speed.

Actual Behavior

  • Marquee Zoom targets the wrong coordinates.
  • Ctrl + Scroll zoom is jittery, overly sensitive, and hard to control.

Environment

  • Library Version: v2.14.4
  • Framework: React
  • Browser: Chrome
  • OS: Windows

Additional Context & Attachments

I have attached the sample PDF, along with screenshots and a screen recording showing both the Marquee Zoom offset and the choppy Ctrl + Scroll behavior.

https://github.com/user-attachments/assets/a33b41c0-8940-4179-8c51-117cb857efc3

Image
主要言語
TypeScript
スター
4.5k
フォーク
317
平均マージ
10時間 16分
マージ済み PR(30日)
174

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

embedpdf/embed-pdf-viewer のほかの issue

embedpdf/embed-pdf-viewer の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。