-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat(PdfReader): support Watermark component #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for your PR, @densen2014. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Reviewer's Guide by SourceryThis pull request introduces a new feature to the PDF reader component that allows the watermark to be displayed only when the PDF is in fullscreen presentation mode. This is achieved by adding a new Sequence diagram for Watermark display in fullscreen modesequenceDiagram
participant User
participant PdfReader.razor.cs
participant limit.js
participant Browser
User->>PdfReader.razor.cs: Sets WatermarkDemoModeOnly to true and Watermark
PdfReader.razor.cs->>PdfReader.razor.cs: GenUrl()
PdfReader.razor.cs-->>Browser: Generates URL with wmonlydemo=true and wm=Watermark
Browser->>limit.js: Loads limit.js with URL parameters
limit.js->>Browser: Adds 'fullscreenchange' event listener
Browser->>User: User enters fullscreen mode
Browser->>limit.js: 'fullscreenchange' event triggered
limit.js->>limit.js: Checks if viewerContainer is in fullscreen
alt viewerContainer is in fullscreen
limit.js->>Browser: Sets watermark value
else viewerContainer is not in fullscreen
limit.js->>Browser: Clears watermark value
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @densen2014 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider debouncing the fullscreen event listener to avoid excessive updates to the watermark.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Link issues
fixes #418
Summary By Copilot
feat(PdfReader ): 全局水印(Watermark IsPage="true")未应用到演示模式中
dotnetcore/BootstrapBlazor#5811 (comment)
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhance PDF reader watermark functionality to support displaying watermark only during full-screen presentation mode
New Features:
Enhancements: