codigo0/node_modules/happy-dom/lib/nodes/svg-component-transfer-function-element/SVGComponentTransferFunctionElement.js
planetazuzu 5d7a6500fe refactor: Fase 1 - Clean Architecture, refactorización modular y eliminación de duplicidades
-  Ticket 1.1: Estructura Clean Architecture en backend
-  Ticket 1.2: Schemas Zod compartidos
-  Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares)
-  Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares)
-  Ticket 1.5: Eliminación de duplicidades (~50 líneas)

Cambios principales:
- Creada estructura Clean Architecture en backend/src/
- Schemas Zod compartidos en backend/src/shared/schemas/
- Refactorización modular de drugs y procedures
- Utilidades genéricas en src/utils/ (filter, validation)
- Eliminados scripts obsoletos y documentación antigua
- Corregidos errores: QueryClient, import test-error-handling
- Build verificado y funcionando correctamente
2026-01-25 21:09:47 +01:00

131 lines
4.8 KiB
JavaScript

import SVGElement from '../svg-element/SVGElement.js';
import * as PropertySymbol from '../../PropertySymbol.js';
import SVGAnimatedNumber from '../../svg/SVGAnimatedNumber.js';
import SVGAnimatedEnumeration from '../../svg/SVGAnimatedEnumeration.js';
import SVGAnimatedNumberList from '../../svg/SVGAnimatedNumberList.js';
/**
* SVGComponentTransferFunctionElement.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGComponentTransferFunctionElement
*/
export default class SVGComponentTransferFunctionElement extends SVGElement {
// Static properties
static SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
static SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
static SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
static SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
static SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
static SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
// Internal properties
[PropertySymbol.type] = null;
[PropertySymbol.tableValues] = null;
[PropertySymbol.slope] = null;
[PropertySymbol.intercept] = null;
[PropertySymbol.amplitude] = null;
[PropertySymbol.exponent] = null;
[PropertySymbol.offset] = null;
/**
* Returns type.
*
* @returns Type.
*/
get type() {
if (!this[PropertySymbol.type]) {
this[PropertySymbol.type] = new SVGAnimatedEnumeration(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('type'),
setAttribute: (value) => this.setAttribute('type', value),
values: ['identity', 'table', 'discrete', 'linear', 'gamma'],
defaultValue: 'identity'
});
}
return this[PropertySymbol.type];
}
/**
* Returns table values.
*
* @returns Table values.
*/
get tableValues() {
if (!this[PropertySymbol.tableValues]) {
this[PropertySymbol.tableValues] = new SVGAnimatedNumberList(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('tableValues'),
setAttribute: (value) => this.setAttribute('tableValues', value)
});
}
return this[PropertySymbol.tableValues];
}
/**
* Returns slope.
*
* @returns Slope.
*/
get slope() {
if (!this[PropertySymbol.slope]) {
this[PropertySymbol.slope] = new SVGAnimatedNumber(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('slope'),
setAttribute: (value) => this.setAttribute('slope', value),
defaultValue: 1
});
}
return this[PropertySymbol.slope];
}
/**
* Returns intercept.
*
* @returns Intercept.
*/
get intercept() {
if (!this[PropertySymbol.intercept]) {
this[PropertySymbol.intercept] = new SVGAnimatedNumber(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('intercept'),
setAttribute: (value) => this.setAttribute('intercept', value)
});
}
return this[PropertySymbol.intercept];
}
/**
* Returns amplitude.
*
* @returns Amplitude.
*/
get amplitude() {
if (!this[PropertySymbol.amplitude]) {
this[PropertySymbol.amplitude] = new SVGAnimatedNumber(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('amplitude'),
setAttribute: (value) => this.setAttribute('amplitude', value),
defaultValue: 1
});
}
return this[PropertySymbol.amplitude];
}
/**
* Returns exponent.
*
* @returns Exponent.
*/
get exponent() {
if (!this[PropertySymbol.exponent]) {
this[PropertySymbol.exponent] = new SVGAnimatedNumber(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('exponent'),
setAttribute: (value) => this.setAttribute('exponent', value),
defaultValue: 1
});
}
return this[PropertySymbol.exponent];
}
/**
* Returns offset.
*
* @returns Offset.
*/
get offset() {
if (!this[PropertySymbol.offset]) {
this[PropertySymbol.offset] = new SVGAnimatedNumber(PropertySymbol.illegalConstructor, this[PropertySymbol.window], {
getAttribute: () => this.getAttribute('offset'),
setAttribute: (value) => this.setAttribute('offset', value)
});
}
return this[PropertySymbol.offset];
}
}
//# sourceMappingURL=SVGComponentTransferFunctionElement.js.map