mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #4520 from timvandermeij/annotation-icon-size
Force default icon size for Text annotations without appearance stream
This commit is contained in:
commit
bda1865fb8
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var DEFAULT_ICON_SIZE = 22; // px
|
||||
var HIGHLIGHT_OFFSET = 4; // px
|
||||
var SUPPORTED_TYPES = ['Link', 'Text', 'Widget'];
|
||||
|
||||
|
@ -624,6 +625,8 @@ var TextAnnotation = (function TextAnnotationClosure() {
|
|||
if (data.hasAppearance) {
|
||||
data.name = 'NoIcon';
|
||||
} else {
|
||||
data.rect[1] = data.rect[3] - DEFAULT_ICON_SIZE;
|
||||
data.rect[2] = data.rect[0] + DEFAULT_ICON_SIZE;
|
||||
data.name = dict.has('Name') ? dict.get('Name').name : 'Note';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue