Commit 8e42ed4
Fix screenshot services using wrong viewport dimensions when designerWidth/Height != 100%
Both DisplayMediaPngWriterService and ElectronPngWriterService used
canvas.offsetWidth/Height for tile viewport sizing but captured from
outercanvas2. When designerWidth/Height > 100%, the canvas element is
larger than the actual capture viewport, causing screenshots to contain
only a fraction of the element. Fix by using outercanvas2.offsetWidth/Height
which matches the actual visible capture area.
Co-authored-by: jogibear9988 <364896+jogibear9988@users.noreply.github.com>
Agent-Logs-Url: https://github.com/node-projects/web-component-designer/sessions/76a14e97-53dd-48d1-9442-f68292307d181 parent c3ae7a1 commit 8e42ed4
File tree
2 files changed
+14
-12
lines changed- packages/web-component-designer/src/elements/services/pngCreatorService
2 files changed
+14
-12
lines changedLines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
0 commit comments