You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
409 B
26 lines
409 B
3 years ago
|
export default class SpriteSymbol {
|
||
|
constructor({ id, viewBox, content }) {
|
||
|
this.id = id;
|
||
|
this.viewBox = viewBox;
|
||
|
this.content = content;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {string}
|
||
|
*/
|
||
|
stringify() {
|
||
|
return this.content;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {string}
|
||
|
*/
|
||
|
toString() {
|
||
|
return this.stringify();
|
||
|
}
|
||
|
|
||
|
destroy() {
|
||
|
['id', 'viewBox', 'content'].forEach(prop => delete this[prop]);
|
||
|
}
|
||
|
}
|