mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
[Editor] Don't throw when changing the color of an invisible highlight
This commit is contained in:
parent
903af4ee00
commit
b4a7007397
2 changed files with 119 additions and 26 deletions
|
@ -151,12 +151,12 @@ class HighlightEditor extends AnnotationEditor {
|
|||
this.addCommands({
|
||||
cmd: () => {
|
||||
this.color = color;
|
||||
this.parent.drawLayer.changeColor(this.#id, color);
|
||||
this.parent?.drawLayer.changeColor(this.#id, color);
|
||||
this.#colorPicker?.updateColor(color);
|
||||
},
|
||||
undo: () => {
|
||||
this.color = savedColor;
|
||||
this.parent.drawLayer.changeColor(this.#id, savedColor);
|
||||
this.parent?.drawLayer.changeColor(this.#id, savedColor);
|
||||
this.#colorPicker?.updateColor(savedColor);
|
||||
},
|
||||
mustExec: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue