mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replace the isArray
helper function with the native Array.isArray
function
*Follow-up to PR 8813.*
This commit is contained in:
parent
22ade754cc
commit
cfb4955a92
17 changed files with 77 additions and 87 deletions
|
@ -14,8 +14,8 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageKind, info, isArray,
|
||||
isLittleEndian, isNum, OPS, shadow, TextRenderingMode, Util, warn
|
||||
FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageKind, info, isLittleEndian, isNum,
|
||||
OPS, shadow, TextRenderingMode, Util, warn
|
||||
} from '../shared/util';
|
||||
import { getShadingPatternFromIR, TilingPattern } from './pattern_helper';
|
||||
import { WebGLUtils } from './webgl';
|
||||
|
@ -1727,13 +1727,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
this.save();
|
||||
this.baseTransformStack.push(this.baseTransform);
|
||||
|
||||
if (isArray(matrix) && matrix.length === 6) {
|
||||
if (Array.isArray(matrix) && matrix.length === 6) {
|
||||
this.transform.apply(this, matrix);
|
||||
}
|
||||
|
||||
this.baseTransform = this.ctx.mozCurrentTransform;
|
||||
|
||||
if (isArray(bbox) && bbox.length === 4) {
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
var width = bbox[2] - bbox[0];
|
||||
var height = bbox[3] - bbox[1];
|
||||
this.ctx.rect(bbox[0], bbox[1], width, height);
|
||||
|
@ -1896,7 +1896,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
resetCtxToDefault(this.ctx);
|
||||
this.current = new CanvasExtraState();
|
||||
|
||||
if (isArray(rect) && rect.length === 4) {
|
||||
if (Array.isArray(rect) && rect.length === 4) {
|
||||
var width = rect[2] - rect[0];
|
||||
var height = rect[3] - rect[1];
|
||||
this.ctx.rect(rect[0], rect[1], width, height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue