Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aufbaudaten edit #97

Merged
merged 4 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added etc/ablaufNeuesSchild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions etc/ablaufNeuesSchild.uxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.3.0">
<zoom_level>9</zoom_level>
<element>
<id>UMLSequenceAllInOne</id>
<coordinates>
<x>99</x>
<y>117</y>
<w>1386</w>
<h>801</h>
</coordinates>
<panel_attributes>title=Bestehende Schilder anzeigen\nNeues hinzufügen
autoTick=true
obj=User~u ACTOR EXECUTION
obj=QuerschnittsEditor\n&lt;&lt;Webanwendung&gt;&gt;~qe
obj=Webserver\nProxy~p
obj=WFS-T~wfs
obj=Oracle-DB~db
on=qe
u-&gt;&gt;&gt;qe: wählt Straße
qe-&gt;&gt;&gt;wfs: fragt Aufstellvorrichtung der Straße ab; on=wfs
wfs-&gt;&gt;&gt;db;on=db
db.&gt;wfs: Aufstellvorrichtungen;off=db
wfs.&gt;qe: Aufstellvorrichtungen;off=wfs
qe-&gt;qe + :Visualisierung
tick=
u-&gt;&gt;&gt;qe: wählt Aufstellvorrichtung
qe-&gt;&gt;&gt;wfs:Abfrage Schilder der Aufstellvorrichtung;on=wfs
wfs-&gt;&gt;&gt;db;on=db
db.&gt;wfs;off=db
wfs.&gt;qe: Schilder;off=wfs
qe-&gt;qe+:Visualisierung
tick=
u-&gt;&gt;&gt;qe: setzt neues Schild
qe-&gt;&gt;&gt;wfs: Daten des neuen Schildes; on=wfs
wfs-&gt;&gt;&gt;db;on=db;
db.&gt;wfs;off=db
wfs.&gt;qe: ID des neuen Schildes;off=wfs
qe-&gt;qe+:Visualisierung
tick=




</panel_attributes>
<additional_attributes/>
</element>
</diagram>
2,770 changes: 875 additions & 1,895 deletions package-lock.json

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,43 @@
],
"homepage": "https://github.com/FlorianTimm/QuerschnittsEditor#readme",
"dependencies": {
"@types/chosen-js": "^1.8.2",
"@types/jquery": "^3.5.5",
"@types/jqueryui": "^1.12.15",
"@types/node": "^14.17.2",
"@types/proj4": "^2.5.0",
"@types/chosen-js": "^1.8.3",
"@types/jquery": "^3.5.6",
"@types/jqueryui": "^1.12.16",
"@types/node": "^16.4.7",
"@types/proj4": "^2.5.2",
"babel-polyfill": "^6.26.0",
"caniuse-lite": "^1.0.30001233",
"caniuse-lite": "^1.0.30001248",
"chosen-js": "^1.8.7",
"clean-webpack-plugin": "^3.0.0",
"core-js": "^3.13.1",
"css-loader": "^5.2.6",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"core-js": "^3.16.0",
"css-loader": "^6.2.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.1",
"html-webpack-plugin": "^5.3.2",
"jquery": "^3.6.0",
"jquery-ui": "^1.12.1",
"jquery-ui-bundle": "^1.12.1-migrate",
"ol": "^6.5.0",
"proj4": "^2.7.2",
"regenerator-runtime": "^0.13.7",
"ol": "^6.6.1",
"proj4": "^2.7.5",
"regenerator-runtime": "^0.13.9",
"src": "^1.1.2",
"style-loader": "^2.0.0",
"ts-loader": "^8.3.0",
"webpack": "^5.38.1"
"style-loader": "^3.2.1",
"ts-loader": "^9.2.4",
"webpack": "^5.47.1"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/chai": "^4.2.18",
"@types/mocha": "^8.2.2",
"@types/ol": "^6.5.0",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
"@types/ol": "^6.5.3",
"chai": "^4.3.4",
"copy-webpack-plugin": "^7.0.0",
"cssnano": "^4.1.11",
"mini-css-extract-plugin": "^1.6.0",
"mocha": "^8.4.0",
"copy-webpack-plugin": "^9.0.1",
"cssnano": "^5.0.7",
"mini-css-extract-plugin": "^2.1.0",
"mocha": "^9.0.3",
"nyc": "^15.1.0",
"source-map-support": "^0.5.19",
"ts-node": "^9.1.1",
"typescript": "^4.3.2"
"ts-node": "^10.1.0",
"typescript": "^4.3.5"
}
}
17 changes: 12 additions & 5 deletions src/config/config_wms.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,20 @@ export const layer = [{
layers: 'b_altona_mr_feinkartierung_flaechen,b_harburg_mr_feinkartierung_flaechen,b_mitte_mr_feinkartierung_flaechen,b_eims_mr_feinkartierung_flaechen,b_wands_mr_feinkartierung_flaechen',
format: 'image/png',
attribution: lgv
},
{
name: "Raster-Ordner",
}, {
name: "QGIS-Server: Planung",
visible: false,
opacity: 0.8,
layers: 'Planung',
url: 'http://gv-srv-w00175:81/cgi-bin/qgis_mapserv.fcgi.exe?',
format: 'image/png',
attribution: lgv
}, {
name: "QGIS-Server: DOP",
visible: false,
opacity: 0.8,
url: 'http://gv-srv-w00175:20031/deegree/services/RasterFolder?',
layers: 'RasterFolder',
layers: 'DOP',
url: 'http://gv-srv-w00175:81/cgi-bin/qgis_mapserv.fcgi.exe?',
format: 'image/png',
attribution: lgv
},
Expand Down
2 changes: 1 addition & 1 deletion src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body,
width: 100%;
margin: 0;
padding: 0;
background-image: url('../img/background_blur.jpg');
background-image: url('~../img/background_blur.jpg');
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
Expand Down
25 changes: 14 additions & 11 deletions src/ts/HTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ export class HTML {
return option;
}

static createTextInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string) {
return HTML.createInputField("text", form, beschriftung, id, inhalt);
static createTextInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, breiteCSS?: string) {
return HTML.createInputField("text", form, beschriftung, id, inhalt, breiteCSS);
}

static createCheckboxTextInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string) {
return HTML.createInputField("text", form, beschriftung, id, inhalt, true);
static createCheckboxTextInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, breiteCSS?: string) {
return HTML.createInputField("text", form, beschriftung, id, inhalt, breiteCSS, true);
}

static createNumberInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string) {
let input = HTML.createInputField("number", form, beschriftung, id, inhalt);
static createNumberInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, breiteCSS?: string) {
let input = HTML.createInputField("number", form, beschriftung, id, inhalt, breiteCSS);
return input;
}

static createDateInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string) {
let aufstellField = HTML.createInputField("text", form, beschriftung, id, inhalt);
static createDateInput(form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, breiteCSS?: string) {
let aufstellField = HTML.createInputField("text", form, beschriftung, id, inhalt, breiteCSS);

aufstellField.autocomplete = "off";
$.datepicker.regional['de'] = {
Expand Down Expand Up @@ -123,10 +123,13 @@ export class HTML {
}


private static createInputField(type: "number" | "text" | "button", form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt: string, checkbox: true): { checkbox: HTMLInputElement, input: HTMLInputElement }
private static createInputField(type: "number" | "text" | "button", form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string): HTMLInputElement
private static createInputField(type: "number" | "text" | "button", form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, checkbox?: boolean): HTMLInputElement | { checkbox: HTMLInputElement, input: HTMLInputElement } {
private static createInputField(type: "number" | "text" | "button", form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt: string, breiteCSS: string, checkbox: true): { checkbox: HTMLInputElement, input: HTMLInputElement }
private static createInputField(type: "number" | "text" | "button", form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, breiteCSS?: string): HTMLInputElement
private static createInputField(type: "number" | "text" | "button", form: HTMLFormElement | HTMLDivElement, beschriftung: string, id: string, inhalt?: string, breiteCSS?: string, checkbox?: boolean): HTMLInputElement | { checkbox: HTMLInputElement, input: HTMLInputElement } {
let formGroup = HTML.createFormGroup(form, 'group_' + id);
if (breiteCSS) {
formGroup.style.width = breiteCSS;
}
let label = HTML.createLabel(beschriftung, id, formGroup, 'label_' + id);
label.className = "label_" + type;
HTML.createBreak(formGroup);
Expand Down
4 changes: 3 additions & 1 deletion src/ts/Klassen/ToolBox.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later

import { LineString, MultiLineString, Point, Polygon } from "ol/geom";
import VectorSource from "ol/source/Vector";
import { Daten } from "../Daten";
import { Abschnitt } from "../Objekte/Abschnitt";
import { VectorLayer } from "../openLayers/Layer";
Expand All @@ -23,7 +25,7 @@ export abstract class ToolBox {
/** Liste aller Radiobuttons */
protected radioButtons: { tool: Tool, radio: HTMLInputElement }[] = []
protected formid: string;
protected layer: VectorLayer[] = [];
protected layer: VectorLayer<VectorSource<Point | Polygon | MultiLineString | LineString>>[] = [];
static liste: { [objektKlasse: string]: ToolBox } = {};
stopped: boolean;
private static selectBox: HTMLSelectElement;
Expand Down
4 changes: 2 additions & 2 deletions src/ts/Objekte/Abschnitt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Abschnitt extends Feature<LineString> {

private _feature: any;
private punkte: LinienPunkt[];
static layer: VectorLayer;
static layer: VectorLayer<VectorSource<LineString>>;

private constructor() {
super();
Expand All @@ -66,7 +66,7 @@ export class Abschnitt extends Feature<LineString> {
}
}

public static getLayer(map?: Map): VectorLayer {
public static getLayer(map?: Map): VectorLayer<VectorSource<LineString>> {
if (!Abschnitt.layer) {
let achsen_style = function (feature: FeatureLike, resolution: number): Style[] {
let abschnitt = feature as Abschnitt;
Expand Down
27 changes: 26 additions & 1 deletion src/ts/Objekte/Aufbaudaten.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

import { Point } from "ol/geom";
import { Klartext } from "./Klartext";
import { SekundaerObjekt } from "./prototypes/SekundaerObjekt";

Expand All @@ -9,7 +10,7 @@ import { SekundaerObjekt } from "./prototypes/SekundaerObjekt";
* @version 2019.10.29
* @license GPL-3.0-or-later
*/
export class Aufbau extends SekundaerObjekt {
export class Aufbau extends SekundaerObjekt<null> {
public getObjektKlassenName(): string {
return "Otschicht";
}
Expand Down Expand Up @@ -55,6 +56,26 @@ export class Aufbau extends SekundaerObjekt {
return this.schichtnr;
}

getArtNeu() {
return this.artneu;
}

getMaterial1() {
return this.material1;
}

getMaterial2() {
return this.material2;
}

getMaterial3() {
return this.material3;
}

isDeckschicht(): boolean {
return this.decksch == '1'
}

// Setter

public getVst() {
Expand All @@ -72,4 +93,8 @@ export class Aufbau extends SekundaerObjekt {
public setBst(bst: number) {
this.bst = bst;
}

public setDeckschicht(decksch: boolean) {
this.decksch = decksch ? '1' : '0';
}
}
7 changes: 4 additions & 3 deletions src/ts/Objekte/Aufstellvorrichtung.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Klartext } from './Klartext';
import { PunktObjekt } from './prototypes/PunktObjekt';
import { Zeichen } from './Zeichen';
import { CONFIG } from '../../config/config'
import VectorSource from "ol/source/Vector";

/**
* Aufstellvorrichtung
Expand All @@ -29,7 +30,7 @@ import { CONFIG } from '../../config/config'
*/
export class Aufstellvorrichtung extends PunktObjekt implements InfoToolOverlay {
static loadErControlCounter: number = 0;
static layer: VectorLayer;
static layer: VectorLayer<VectorSource<Point | LineString>>;
static select: SelectInteraction;

private overlay: Overlay;
Expand All @@ -55,7 +56,7 @@ export class Aufstellvorrichtung extends PunktObjekt implements InfoToolOverlay
return 'black';
}

static getLayer(map?: Map): VectorLayer {
static getLayer(map?: Map): VectorLayer<VectorSource<Point | LineString>> {
if (!Aufstellvorrichtung.layer) {
Aufstellvorrichtung.layer = Aufstellvorrichtung.createLayer(map);
}
Expand Down Expand Up @@ -486,7 +487,7 @@ export class Aufstellvorrichtung extends PunktObjekt implements InfoToolOverlay
stopEvent: false
});

this.overlay.on("click", () => {
this.overlay.getElement().addEventListener("click", () => {
this.hideOverlay(map);
return false;
});
Expand Down
2 changes: 1 addition & 1 deletion src/ts/Objekte/Dokument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SekundaerObjekt } from "./prototypes/SekundaerObjekt";
* @version 2020.01.28
* @license GPL-3.0-or-later
*/
export class Dokument extends SekundaerObjekt {
export class Dokument extends SekundaerObjekt<null> {
protected art: Klartext
protected beschreib: string
protected standort: string
Expand Down
2 changes: 1 addition & 1 deletion src/ts/Objekte/Klartext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class Klartext {
let arten = Klartext.getAllSorted(klartext);
for (let a of arten) {
let isSelected = (value && value.getXlink() == a.getXlink());
HTML.createSelectNode(selectInput, a.getKt() + ' - ' + a.getBeschreib(), a.getXlink(), isSelected);
HTML.createSelectNode(selectInput, a.getKt().match('[^~]+$')[0] + ' - ' + a.getBeschreib(), a.getXlink(), isSelected);
}
if (value == null && platzhalter != undefined)
selectInput.value = null;
Expand Down
10 changes: 5 additions & 5 deletions src/ts/Objekte/QuerStation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Map } from 'ol';
import Feature from 'ol/Feature';
import { Point } from 'ol/geom';
import { LineString, Point } from 'ol/geom';
import MultiLineString from 'ol/geom/MultiLineString';
import VectorSource from 'ol/source/Vector';
import { Stroke, Style } from 'ol/style';
Expand Down Expand Up @@ -30,7 +30,7 @@ export class QuerStation {
private _querschnitte: { [streifen: string]: { [streifennr: number]: Querschnitt } } = {};
private linienPunkte: LinienPunkt[];
public aufbaudatenLoaded: Promise<{ [fid: string]: Aufbau[] }>;
private static layerStation: VectorLayer;
private static layerStation: VectorLayer<VectorSource<MultiLineString | Point>>;

constructor(abschnitt: Abschnitt, vst: number, bst: number) {
this.daten = Daten.getInstanz();
Expand Down Expand Up @@ -120,17 +120,17 @@ export class QuerStation {
let letzter = this.linienPunkte[this.linienPunkte.length - 1];
let statTrenn = [];
statTrenn.push([Vektor.sum(letzter.getCoordinates(), Vektor.multi(letzter.seitlicherVektorAmPunkt, 30)), Vektor.sum(letzter.getCoordinates(), Vektor.multi(letzter.seitlicherVektorAmPunkt, -30))]);
QuerStation.layerStation.getSource().addFeature(new Feature({ geom: new Point(letzter.getCoordinates()) }));
QuerStation.layerStation.getSource().addFeature(new Feature<Point>({ geom: new Point(letzter.getCoordinates()) }));
if (this.vst == 0) {
statTrenn.push([Vektor.sum(erster.getCoordinates(), Vektor.multi(erster.seitlicherVektorAmPunkt, 30)), Vektor.sum(erster.getCoordinates(), Vektor.multi(erster.seitlicherVektorAmPunkt, -30))]);
QuerStation.layerStation.getSource().addFeature(new Feature({ geom: new Point(erster.getCoordinates()) }));
QuerStation.layerStation.getSource().addFeature(new Feature<Point>({ geom: new Point(erster.getCoordinates()) }));
}

if (this.linie) {
this.linie.setCoordinates(statTrenn)
} else {
this.linie = new MultiLineString(statTrenn);
let feat = new Feature({
let feat = new Feature<MultiLineString>({
geometry: this.linie,
objekt: this,
});
Expand Down
Loading