mirror of
https://github.com/slidevjs/rough-notation.git
synced 2026-01-24 14:00:27 +01:00
feat: allow update class from instance
This commit is contained in:
@@ -40,6 +40,16 @@ class RoughAnnotationImpl implements RoughAnnotation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get class() { return this._config.class; }
|
||||||
|
set class(value) {
|
||||||
|
if (this._config.class !== value) {
|
||||||
|
this._config.class = value;
|
||||||
|
if (this._svg) {
|
||||||
|
this._svg.setAttribute('class', ['rough-annotation', this._config.class || ''].filter(Boolean).join(' '));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get strokeWidth() { return this._config.strokeWidth; }
|
get strokeWidth() { return this._config.strokeWidth; }
|
||||||
set strokeWidth(value) {
|
set strokeWidth(value) {
|
||||||
if (this._config.strokeWidth !== value) {
|
if (this._config.strokeWidth !== value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user