@@ -1078,7 +1078,7 @@ html2canvas.prototype.canvasRenderContext = function(storageContext,ctx){
10781078 if ( storageContext . clip ) {
10791079 ctx . save ( ) ;
10801080 ctx . beginPath ( ) ;
1081- // console.log(storageContext);
1081+ // console.log(storageContext);
10821082 ctx . rect ( storageContext . clip . left , storageContext . clip . top , storageContext . clip . width , storageContext . clip . height ) ;
10831083 ctx . clip ( ) ;
10841084
@@ -1094,34 +1094,29 @@ html2canvas.prototype.canvasRenderContext = function(storageContext,ctx){
10941094 break ;
10951095 case "function" :
10961096 if ( renderItem . name == "fillRect" ) {
1097+
10971098 ctx . fillRect (
1098- renderItem . arguments [ 0 ] - ( storageContext . canvasPosition . x || 0 ) ,
1099- renderItem . arguments [ 1 ] - ( storageContext . canvasPosition . y || 0 ) ,
1099+ renderItem . arguments [ 0 ] ,
1100+ renderItem . arguments [ 1 ] ,
11001101 renderItem . arguments [ 2 ] ,
11011102 renderItem . arguments [ 3 ]
11021103 ) ;
11031104 } else if ( renderItem . name == "fillText" ) {
11041105 // console.log(renderItem.arguments[0]);
1105-
1106- ctx . fillText ( renderItem . arguments [ 0 ] , renderItem . arguments [ 1 ] - ( storageContext . canvasPosition . x || 0 ) , renderItem . arguments [ 2 ] - ( storageContext . canvasPosition . y || 0 ) ) ;
1107- /*
1108- if (renderItem.arguments[0]=="Highlights"){
1109- console.log(renderItem);
1110- console.log(storageContext);
1111- $('body').append(ctx.canvas);
1112- }*/
1106+ ctx . fillText ( renderItem . arguments [ 0 ] , renderItem . arguments [ 1 ] , renderItem . arguments [ 2 ] ) ;
1107+
11131108 } else if ( renderItem . name == "drawImage" ) {
11141109 // console.log(renderItem);
1115- // console.log(renderItem.arguments[0].width);
1110+ // console.log(renderItem.arguments[0].width);
11161111 if ( renderItem . arguments [ 8 ] > 0 && renderItem . arguments [ 7 ] ) {
11171112 ctx . drawImage (
11181113 renderItem . arguments [ 0 ] ,
11191114 renderItem . arguments [ 1 ] ,
11201115 renderItem . arguments [ 2 ] ,
11211116 renderItem . arguments [ 3 ] ,
11221117 renderItem . arguments [ 4 ] ,
1123- renderItem . arguments [ 5 ] - ( storageContext . canvasPosition . x || 0 ) ,
1124- renderItem . arguments [ 6 ] - ( storageContext . canvasPosition . y || 0 ) ,
1118+ renderItem . arguments [ 5 ] ,
1119+ renderItem . arguments [ 6 ] ,
11251120 renderItem . arguments [ 7 ] ,
11261121 renderItem . arguments [ 8 ]
11271122 ) ;
@@ -1140,9 +1135,9 @@ html2canvas.prototype.canvasRenderContext = function(storageContext,ctx){
11401135 } ) ;
11411136
11421137 }
1143- if ( storageContext . clip ) {
1144- ctx . restore ( ) ;
1145- }
1138+ if ( storageContext . clip ) {
1139+ ctx . restore ( ) ;
1140+ }
11461141
11471142}
11481143
@@ -1790,9 +1785,10 @@ html2canvas.prototype.formatZ = function(zindex,position,parentZ,parentNode){
17901785 var parentPosition = this . getCSS ( parentNode , "position" ) ;
17911786 if ( parentPosition != "static" && typeof parentPosition != "undefined" ) {
17921787 zindex = 0 ;
1793- } else {
1794- return parentZ ;
17951788 }
1789+ /*else{
1790+ return parentZ;
1791+ }*/
17961792 }
17971793
17981794 var b = this . leadingZero ( this . numDraws , 9 ) ;
0 commit comments