mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Add the color changes in the annotation storage
This commit is contained in:
parent
7ae5a0fef7
commit
d16d1f0d23
4 changed files with 57 additions and 12 deletions
|
@ -331,9 +331,13 @@ class AnnotationElement {
|
|||
get _commonActions() {
|
||||
const setColor = (jsName, styleName, event) => {
|
||||
const color = event.detail[jsName];
|
||||
event.target.style[styleName] = ColorConverters[`${color[0]}_HTML`](
|
||||
color.slice(1)
|
||||
);
|
||||
const colorType = color[0];
|
||||
const colorArray = color.slice(1);
|
||||
event.target.style[styleName] =
|
||||
ColorConverters[`${colorType}_HTML`](colorArray);
|
||||
this.annotationStorage.setValue(this.data.id, {
|
||||
[styleName]: ColorConverters[`${colorType}_rgb`](colorArray),
|
||||
});
|
||||
};
|
||||
|
||||
return shadow(this, "_commonActions", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue