@percy/dom 1.31.3-beta.2 → 1.31.3-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +4 -2
  2. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -372,8 +372,10 @@
372
372
  img.setAttribute('data-percy-canvas-serialized', '');
373
373
  img.setAttribute('data-percy-serialized-attribute-src', imageUrl);
374
374
 
375
- // set a default max width to account for canvases that might resize with JS
376
- img.style.maxWidth = img.style.maxWidth || '100%';
375
+ // set the maxWidth only if it was set on the canvas
376
+ if (canvas.style.maxWidth) {
377
+ img.style.maxWidth = canvas.style.maxWidth;
378
+ }
377
379
 
378
380
  // insert the image into the cloned DOM and remove the cloned canvas element
379
381
  let cloneEl = clone.querySelector(`[data-percy-element-id=${percyElementId}]`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/dom",
3
- "version": "1.31.3-beta.2",
3
+ "version": "1.31.3-beta.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "interactor.js": "^2.0.0-beta.10"
37
37
  },
38
- "gitHead": "88c987a1544fc803397b5298b88f7a254c729a75"
38
+ "gitHead": "d4fa0ae4e58a2f8fd2e389492ee6f2ef0e6c7fd0"
39
39
  }