Skip to content

Commit

Permalink
Merge pull request #141 from jasonday/single-canvas
Browse files Browse the repository at this point in the history
Add Top-Level Canvas Support
  • Loading branch information
oculus42 authored Jan 10, 2018
2 parents 4a007b0 + 64f6cf2 commit 06f9572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion printThis.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
if (opt.canvas) {
// add canvas data-ids for easy access after cloning.
var canvasId = 0;
$element.find('canvas').each(function(){
// .addBack('canvas') adds the top-level element if it is a canvas.
$element.find('canvas').addBack('canvas').each(function(){
$(this).attr('data-printthis', canvasId++);
});
}
Expand Down

0 comments on commit 06f9572

Please sign in to comment.