12345678910111213141516171819202122232425 |
- 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]);
- }
- }
|