Free and Open source Web Builder Framework. Next generation tool for building templates without coding
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.
 
 
 
 

25 lines
579 B

import Component from './Component';
import { toLowerCase } from 'utils/mixins';
const type = 'svg';
export default class ComponentSvg extends Component {
get defaults() {
return {
...super.defaults,
type,
tagName: type,
highlightable: 0,
resizable: { ratioDefault: 1 },
};
}
getName() {
let name = this.get('tagName');
let customName = this.get('custom-name');
name = name.charAt(0).toUpperCase() + name.slice(1);
return customName || name;
}
}
ComponentSvg.isComponent = el => toLowerCase(el.tagName) === type;