UNPKG

zextra

Version:

***Zextra*** stands for "Ziko Extra" is an extension package that enhances [ZikoJS](https://github.com/zakarialaoui10/ziko.js) by providing additional utilities and UI elements. It expands ZikoJS with extra features, making it easier to work with custom U

29 lines 678 B
import ZikoSvgElement from "../ZikoSvgElement.js"; class ZikoSvgCircle extends ZikoSvgElement{ constructor(cx,cy,r){ super("circle") this.element=document.createElementNS( "http://www.w3.org/2000/svg", "circle", ); this.pos(cx,cy).setR(r); } setR(r){ this.element.r.baseVal.value=r; return this; } get r(){ return this.element.baseVal.value; } get cx(){ return this.element.baseVal.value; } get cy(){ return this.element.baseVal.value; } } const svgCircle=(x,y,r)=>new ZikoSvgCircle(x,y,r); export { svgCircle, ZikoSvgCircle }