mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Adjust how AnnotationBorderStyle.setWidth
handles the input being a Name
(issue 10385)
In order to be consistent with the behaviour in Adobe Reader, the width will now always be set to zero when the input is a `Name`.
This commit is contained in:
parent
5a2bd9fc63
commit
66fccd860b
2 changed files with 9 additions and 5 deletions
|
@ -236,12 +236,15 @@ describe('annotation', function() {
|
|||
expect(borderStyle.width).toEqual(1);
|
||||
});
|
||||
|
||||
it('should set/get a valid width, when the input is a `Name` (issue 10385)',
|
||||
it('should set the width to zero, when the input is a `Name` (issue 10385)',
|
||||
function() {
|
||||
const borderStyle = new AnnotationBorderStyle();
|
||||
borderStyle.setWidth(Name.get('0'));
|
||||
const borderStyleZero = new AnnotationBorderStyle();
|
||||
borderStyleZero.setWidth(Name.get('0'));
|
||||
const borderStyleFive = new AnnotationBorderStyle();
|
||||
borderStyleFive.setWidth(Name.get('5'));
|
||||
|
||||
expect(borderStyle.width).toEqual(0);
|
||||
expect(borderStyleZero.width).toEqual(0);
|
||||
expect(borderStyleFive.width).toEqual(0);
|
||||
});
|
||||
|
||||
it('should set and get a valid style', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue