Skip to content

Commit

Permalink
1.14.1 - Added fix for canvas data attribute removal from apires03. F…
Browse files Browse the repository at this point in the history
…ixes #169
  • Loading branch information
oculus42 committed Nov 3, 2018
1 parent c814846 commit edc43df
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
11/03/2018 Added fix for canvas data attribute removal from apires03
Bumped to 1.14.1

07/15/2018 Merge support for print event handlers from eakkew
Include fix for CSS Variables (via inline styles set on HTML tag)
Make documentation consistent
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "print-this",
"version": "1.14.0",
"version": "1.14.1",
"description": "Printing plug-in for jQuery",
"main": "printThis.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion printThis.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "printThis",
"version": "1.14.0",
"version": "1.14.1",
"title": "printThis",
"description": "Printing plug-in for jQuery. Print specific page elements, add print options, maintain or add new styling using jQuery.",
"author": {
Expand Down
10 changes: 8 additions & 2 deletions printThis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* printThis v1.14.0
* printThis v1.14.1
* @desc Printing plug-in for jQuery
* @author Jason Day
*
Expand Down Expand Up @@ -232,7 +232,13 @@
this.getContext('2d').drawImage($src[0], 0, 0);

// Remove the markup from the original
$src.removeData('printthis');
if ($.isFunction($.fn.removeAttr)) {
$src.removeAttr('data-printthis');
} else {
$.each($src, function(i, el) {
el.removeAttribute('data-printthis')
});
}
});
}

Expand Down

0 comments on commit edc43df

Please sign in to comment.