sensorDigital, grafik Fest, drawPunkt eingefügt
This commit is contained in:
1 parent
f43053d7b3
commit
6e4bd5339f
51 files changed
+1203
-31
No files matched your search
@@ -1,5 +1,7 @@
|
||||
import { Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { parseMotorRequest } from '../_dto/motor.dto';
|
||||
import { parsePunktRequest } from '../_dto/punkt.dto';
|
||||
import { DrawPunkt } from '../graphics/elements/drawPunkt';
|
||||
import { DrawFahrwagenOben } from '../graphics/elements/drawFahrwagenOben';
|
||||
import { parseFahrwagenObenRequest } from '../_dto/fahrwagen-oben.dto';
|
||||
import { parseAnlageDurminRequest } from '../_dto/anlage-durmin.dto';
|
||||
@@ -57,6 +59,7 @@ export class DrawService {
|
||||
private readonly buildMotor: DrawMotor,
|
||||
private readonly buildAnlageDurmin: DrawAnlageDurmin,
|
||||
private readonly buildFahrwagenOben: DrawFahrwagenOben,
|
||||
private readonly buildPunkt: DrawPunkt,
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +76,10 @@ export class DrawService {
|
||||
|
||||
renderGraphic(type: string, input: unknown) {
|
||||
switch (type) {
|
||||
case 'punkt': {
|
||||
const { config, options } = parsePunktRequest(input);
|
||||
return this.buildPunkt.getObject(config, options);
|
||||
}
|
||||
case 'fahrbandOben': // Kompatibilität für bereits gespeicherte Generatoren.
|
||||
case 'fahrwagenOben': {
|
||||
const { config, options } = parseFahrwagenObenRequest(input);
|
||||
@@ -182,6 +189,10 @@ export class DrawService {
|
||||
return this.buildBehaelterMulti.getDrawObject(options);
|
||||
}
|
||||
|
||||
punkt(options?: DrawShapeOptionenDto, rawSvg?: boolean) {
|
||||
return rawSvg ? this.buildPunkt.getSvg(options) : this.buildPunkt.getDrawObject(options);
|
||||
}
|
||||
|
||||
motor(options?: DrawShapeOptionenDto, rawSvg?: boolean) {
|
||||
if (rawSvg) return this.buildMotor.getSvg(options);
|
||||
return this.buildMotor.getDrawObject(options);
|
||||
|
||||
Reference in new issue
Block a user