First commit
This commit is contained in:
75
application/elements/preloaders/spinner.js
Normal file
75
application/elements/preloaders/spinner.js
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
import document from "/unify/document.js";
|
||||
|
||||
|
||||
class circle{
|
||||
|
||||
customElement = document.createElementNS("http://www.w3.org/2000/svg","circle");
|
||||
|
||||
useCustomElement = true;
|
||||
|
||||
layers = 1;
|
||||
|
||||
zIndex = 1000;
|
||||
|
||||
boxShadow = "inset 0 0 0 1px rgb(0 0 0 / 50%)!important"
|
||||
|
||||
create() {
|
||||
|
||||
this.customElement.setAttributeNS(null,"cx", "50")
|
||||
|
||||
this.customElement.setAttributeNS(null,"cy", "50")
|
||||
|
||||
this.customElement.setAttributeNS(null,"r", "20")
|
||||
|
||||
this.customElement.setAttributeNS(null,"fill", "none")
|
||||
|
||||
this.customElement.setAttributeNS(null,"stroke-width", "2")
|
||||
|
||||
this.customElement.setAttributeNS(null,"stroke-miterlimit", "10")
|
||||
|
||||
this.customElement.setAttributeNS(null,"box-shadow", "inset 0 0 0 1px rgb(0 0 0 / 50%)!important")
|
||||
|
||||
|
||||
|
||||
this.customElement.classList.add('path-dark');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class spinner{
|
||||
|
||||
customElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
||||
|
||||
useCustomElement = true;
|
||||
|
||||
layers = 1;
|
||||
|
||||
circle = new circle();
|
||||
|
||||
create() {
|
||||
|
||||
this.customElement.setAttributeNS(null,"viewBox", "25 25 50 50")
|
||||
|
||||
this.element.setAttributeNS(null, "class", "circular");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default class preloaderBox{
|
||||
|
||||
layers = 1;
|
||||
|
||||
margin = 40
|
||||
|
||||
width = 40;
|
||||
|
||||
spinner = new spinner();
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user