Skip to content

Conversation

@kevingpqi123
Copy link
Collaborator

Problem

On HarmonyOS, PAGImageView and PAGView behave differently when calling setScaleMode(0):

  • PAGView: matrix is correctly reset
  • PAGImageView: matrix keeps previous mode effect

Related: #2914

Solution

Remove early return when scaleMode is None. ApplyScaleMode() already returns identity matrix for None.

Remove early return when scaleMode is None in refreshMatrixFromScaleMode(),
so that the matrix will be properly reset to identity matrix via
ApplyScaleMode() which returns identity matrix for PAGScaleMode::None.

This fixes the issue where calling setScaleMode(0) after setScaleMode(2)
on PAGImageView would not update the rendering as expected.

Fixes: #2914
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.24%. Comparing base (187bd07) to head (7578981).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3256      +/-   ##
==========================================
+ Coverage   77.10%   77.24%   +0.13%     
==========================================
  Files         415      415              
  Lines       22040    22040              
  Branches     6307     6307              
==========================================
+ Hits        16995    17024      +29     
+ Misses       3818     3811       -7     
+ Partials     1227     1205      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@domchen domchen merged commit c94f39d into main Feb 4, 2026
9 checks passed
@domchen domchen deleted the fix/ohos-pagimageview-scalemode-none branch February 4, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants