@@ -150,11 +150,13 @@ var groupContentTemplate = {
150
150
elementToPrint = elementToPrint . getElementById ( 'indicatorCriteriaTable' ) ;
151
151
isScenarioInChrome = / C h r o m e / . test ( navigator . userAgent ) && / G o o g l e I n c / . test ( navigator . vendor ) ;
152
152
imageScale = 1 ;
153
+ imageName = 'table-snapshot.jpg' ;
153
154
replaceImgSourceWithBase64Encoding ( elementToPrint , imagesToRecover ) ;
154
155
} else if ( event . currentTarget . id == 'includeChartButton' ) {
155
156
//print the chart of the scenario analysis tool
156
157
elementToPrint = elementToPrint . getElementById ( 'indicator-bar-charts' ) . firstChild ;
157
158
isScenarioInChrome = / C h r o m e / . test ( navigator . userAgent ) && / G o o g l e I n c / . test ( navigator . vendor ) ;
159
+ imageName = 'charts-snapshot.jpg' ;
158
160
imageScale = 1 ;
159
161
replaceImgSourceWithBase64Encoding ( elementToPrint , imagesToRecover ) ;
160
162
} else if ( iframeFound && elementToPrint . getElementById ( '#map' ) != null ) {
@@ -279,11 +281,17 @@ function replaceTranslate3dStyleByElement(element) {
279
281
}
280
282
281
283
if (
284
+ element . style [ 'bottom' ] != null &&
285
+ element . style [ 'bottom' ] != '' &&
286
+ element . style [ 'bottom' ] . indexOf ( 'px' ) != - 1
287
+ ) {
288
+ element . style [ 'bottom' ] = parseInt ( element . style [ 'bottom' ] . replace ( / p x / g, '' ) ) - trans_y + 'px' ;
289
+ } else if (
282
290
element . style [ 'top' ] != null &&
283
291
element . style [ 'top' ] != '' &&
284
292
element . style [ 'top' ] . indexOf ( 'px' ) != - 1
285
293
) {
286
- element . style [ 'top' ] = parseInt ( element . style [ 'top' ] . replace ( / p x / g, '' ) ) + trans_x + 'px' ;
294
+ element . style [ 'top' ] = parseInt ( element . style [ 'top' ] . replace ( / p x / g, '' ) ) + trans_y + 'px' ;
287
295
} else {
288
296
element . style [ 'top' ] = trans_y + 'px' ;
289
297
}
0 commit comments