Skip to content

Commit

Permalink
Prepare for 3.3.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
IDisposable committed Feb 14, 2024
1 parent d7086e6 commit 866a5a6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 21 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ domtoimage.toCanvas(document.getElementById('my-node')).then(function (canvas) {
});
```

Adjust cloned nodes before/after children are cloned [sample fiddle](https://jsfiddle.net/IDisposable/grLtjwe5/12/)

```javascript
const adjustClone = (node, clone, after) => {
if (!after && clone.id === 'element') {
clone.style.transform = 'translateY(100px)';
}
return clone;
}

const wrapper = document.getElementById('wrapper');
const blob = domtoimage.toBlob(wrapper, { adjustClonedNode: adjustClone});
```

---

_All the functions under `impl` are not public API and are exposed only for unit testing._
Expand Down
55 changes: 35 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dom-to-image-more",
"version": "3.3.0-rc",
"version": "3.3.0",
"description": "Generates an image from a DOM node using HTML5 canvas and SVG",
"main": "dist/dom-to-image-more.min.js",
"devDependencies": {
Expand Down

0 comments on commit 866a5a6

Please sign in to comment.