Minor edits
This commit is contained in:
parent
c512ed32da
commit
c52dd4e959
|
@ -4,7 +4,7 @@ export default class WebAnnotation {
|
|||
|
||||
constructor(annotation, opts) {
|
||||
this.underlying = annotation;
|
||||
this.readOnly = opts?.readOnly;
|
||||
this.opts = opts;
|
||||
}
|
||||
|
||||
/** For convenience - creates an empty web annotation **/
|
||||
|
@ -21,7 +21,7 @@ export default class WebAnnotation {
|
|||
|
||||
/** Creates a copy of this annotation **/
|
||||
clone = opt_props => {
|
||||
return new WebAnnotation({ ...this.underlying, ...opt_props});
|
||||
return new WebAnnotation({ ...this.underlying, ...opt_props}, this.opts);
|
||||
}
|
||||
|
||||
/** An equality check based on the underlying object or (if given) ID **/
|
||||
|
@ -36,6 +36,10 @@ export default class WebAnnotation {
|
|||
return this.underlying.id === other.underlying.id
|
||||
}
|
||||
|
||||
get readOnly() {
|
||||
return this.opts?.readOnly;
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
/* Getters to forward properties of */
|
||||
/* the underlying annotation */
|
||||
|
|
Loading…
Reference in New Issue