mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Adjust the (applicable) existing isName
callsites to use the new isName(v, name)
version of the function
This commit is contained in:
parent
af636aae96
commit
83ce6f0b6d
4 changed files with 13 additions and 17 deletions
|
@ -93,7 +93,7 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
|
|||
|
||||
case 'Widget':
|
||||
var fieldType = Util.getInheritableProperty(dict, 'FT');
|
||||
if (isName(fieldType) && fieldType.name === 'Tx') {
|
||||
if (isName(fieldType, 'Tx')) {
|
||||
return new TextWidgetAnnotation(parameters);
|
||||
}
|
||||
return new WidgetAnnotation(parameters);
|
||||
|
@ -338,10 +338,9 @@ var Annotation = (function AnnotationClosure() {
|
|||
}
|
||||
if (borderStyle.has('BS')) {
|
||||
var dict = borderStyle.get('BS');
|
||||
var dictType;
|
||||
var dictType = dict.get('Type');
|
||||
|
||||
if (!dict.has('Type') || (isName(dictType = dict.get('Type')) &&
|
||||
dictType.name === 'Border')) {
|
||||
if (!dictType || isName(dictType, 'Border')) {
|
||||
this.borderStyle.setWidth(dict.get('W'));
|
||||
this.borderStyle.setStyle(dict.get('S'));
|
||||
this.borderStyle.setDashArray(dict.getArray('D'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue