@designliquido/foles
Version:
Linguagem de folhas de estilo para documentos em geral em português
58 lines • 2.63 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Translate3d = void 0;
const metodo_css_1 = require("./metodo-css");
class Translate3d extends metodo_css_1.MetodoCss {
constructor(valor1, quantificador1, valor2, quantificador2, valor3, quantificador3) {
super();
this.valor1 = Number(valor1.lexema);
this.quantificador1 = quantificador1 ? quantificador1.lexema : null;
this.valor2 = valor2 ? Number(valor2.lexema) : null;
this.quantificador2 = quantificador2 ? quantificador2.lexema : null;
this.valor3 = valor3 ? Number(valor3.lexema) : null;
this.quantificador3 = quantificador3 ? quantificador3.lexema : null;
this.traducao = "translate3d";
}
paraTexto() {
if (!this.quantificador1 &&
!this.valor2 &&
!this.quantificador2 &&
!this.valor3 &&
!this.quantificador3) {
return `translacao-3d(${this.valor1})`;
}
if (!this.quantificador1 &&
this.quantificador2 &&
this.quantificador3) {
return `translacao-3d(${this.valor1}, ${this.valor2}${this.quantificador2}, ${this.valor3}${this.quantificador3})`;
}
if (!this.quantificador2 &&
this.quantificador1 &&
this.quantificador3) {
return `translacao-3d(${this.valor1}${this.quantificador1}, ${this.valor2}, ${this.valor3}${this.quantificador3})`;
}
if (!this.quantificador3 &&
this.quantificador2 &&
this.quantificador1) {
return `translacao-3d(${this.valor1}${this.quantificador1}, ${this.valor2}${this.quantificador2}, ${this.valor3})`;
}
if (!this.quantificador1 &&
!this.quantificador2 &&
this.quantificador3) {
return `translacao-3d(${this.valor1}, ${this.valor2}, ${this.valor3}${this.quantificador3})`;
}
if (!this.quantificador3 &&
this.quantificador2 &&
!this.quantificador1) {
return `translacao-3d(${this.valor1}, ${this.valor2}${this.quantificador2}, ${this.valor3})`;
}
if (!this.quantificador3 &&
!this.quantificador2 &&
this.quantificador1) {
return `translacao-3d(${this.valor1}${this.quantificador1}, ${this.valor2}, ${this.valor3})`;
}
return `translacao-3d(${this.valor1}${this.quantificador1}, ${this.valor2}${this.quantificador2}, ${this.valor3}${this.quantificador3})`;
}
}
exports.Translate3d = Translate3d;
//# sourceMappingURL=translate3d.js.map