@@ -1581,32 +1581,32 @@ AcroForm.internal.calculateCoordinates = function (x, y, w, h) {
1581
1581
x [ 2 ] = AcroForm . scale ( x [ 2 ] ) ;
1582
1582
x [ 3 ] = AcroForm . scale ( x [ 3 ] ) ;
1583
1583
1584
- coordinates . lowerLeft_X = x [ 0 ] | 0 ;
1585
- coordinates . lowerLeft_Y = ( mmtopx . call ( this , this . internal . pageSize . height ) - x [ 3 ] - x [ 1 ] ) | 0 ;
1586
- coordinates . upperRight_X = x [ 0 ] + x [ 2 ] | 0 ;
1587
- coordinates . upperRight_Y = ( mmtopx . call ( this , this . internal . pageSize . height ) - x [ 1 ] ) | 0 ;
1584
+ coordinates . lowerLeft_X = x [ 0 ] || 0 ;
1585
+ coordinates . lowerLeft_Y = ( mmtopx . call ( this , this . internal . pageSize . height ) - x [ 3 ] - x [ 1 ] ) || 0 ;
1586
+ coordinates . upperRight_X = x [ 0 ] + x [ 2 ] || 0 ;
1587
+ coordinates . upperRight_Y = ( mmtopx . call ( this , this . internal . pageSize . height ) - x [ 1 ] ) || 0 ;
1588
1588
} else {
1589
1589
x = AcroForm . scale ( x ) ;
1590
1590
y = AcroForm . scale ( y ) ;
1591
1591
w = AcroForm . scale ( w ) ;
1592
1592
h = AcroForm . scale ( h ) ;
1593
- coordinates . lowerLeft_X = x | 0 ;
1594
- coordinates . lowerLeft_Y = this . internal . pageSize . height - y | 0 ;
1595
- coordinates . upperRight_X = x + w | 0 ;
1596
- coordinates . upperRight_Y = this . internal . pageSize . height - y + h | 0 ;
1593
+ coordinates . lowerLeft_X = x || 0 ;
1594
+ coordinates . lowerLeft_Y = this . internal . pageSize . height - y || 0 ;
1595
+ coordinates . upperRight_X = x + w || 0 ;
1596
+ coordinates . upperRight_Y = this . internal . pageSize . height - y + h || 0 ;
1597
1597
}
1598
1598
} else {
1599
1599
// old method, that is fallback, if we can't get the pageheight, the coordinate-system starts from lower left
1600
1600
if ( Array . isArray ( x ) ) {
1601
- coordinates . lowerLeft_X = x [ 0 ] | 0 ;
1602
- coordinates . lowerLeft_Y = x [ 1 ] | 0 ;
1603
- coordinates . upperRight_X = x [ 0 ] + x [ 2 ] | 0 ;
1604
- coordinates . upperRight_Y = x [ 1 ] + x [ 3 ] | 0 ;
1601
+ coordinates . lowerLeft_X = x [ 0 ] || 0 ;
1602
+ coordinates . lowerLeft_Y = x [ 1 ] || 0 ;
1603
+ coordinates . upperRight_X = x [ 0 ] + x [ 2 ] || 0 ;
1604
+ coordinates . upperRight_Y = x [ 1 ] + x [ 3 ] || 0 ;
1605
1605
} else {
1606
- coordinates . lowerLeft_X = x | 0 ;
1607
- coordinates . lowerLeft_Y = y | 0 ;
1608
- coordinates . upperRight_X = x + w | 0 ;
1609
- coordinates . upperRight_Y = y + h | 0 ;
1606
+ coordinates . lowerLeft_X = x || 0 ;
1607
+ coordinates . lowerLeft_Y = y || 0 ;
1608
+ coordinates . upperRight_X = x + w || 0 ;
1609
+ coordinates . upperRight_Y = y + h || 0 ;
1610
1610
}
1611
1611
}
1612
1612
0 commit comments