Commit d025cfd4 authored by Tobias Liese's avatar Tobias Liese

no major change

parent 23e18a37
Pipeline #96136 failed with stages
in 18 minutes and 21 seconds
#Gradle properties
#Tue Feb 11 17:11:23 UTC 2020
quarkusPluginVersion=1.3.0.CR1
quarkusPluginVersion=1.3.0.CR2
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=1.3.0.CR1
quarkusPlatformVersion=1.3.0.CR2
quarkusPlatformGroupId=io.quarkus
......@@ -4,3 +4,5 @@ M
INFORMATION: Initializing Quarkus server 0.0.4-20191120-1547 with C:\Users\tobia\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\201.6073.9\jbr
Mrz 09, 2020 3:58:24 NACHM. com.redhat.quarkus.ls.QuarkusLanguageServer initialize
INFORMATION: Initializing Quarkus server 0.0.4-20191120-1547 with C:\Users\tobia\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\201.6073.9\jbr
Mrz 09, 2020 6:51:17 NACHM. com.redhat.quarkus.ls.QuarkusLanguageServer initialize
INFORMATION: Initializing Quarkus server 0.0.4-20191120-1547 with C:\Users\tobia\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\201.6073.9\jbr
Mrz 10, 2020 7:03:30 VORM. com.redhat.quarkus.ls.QuarkusLanguageServer initialize
INFORMATION: Initializing Quarkus server 0.0.4-20191120-1547 with C:\Users\tobia\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\201.6073.9\jbr
......@@ -22,6 +22,7 @@ public class AutomatonResource {
@Path("{name}")
@Produces(MediaType.TEXT_HTML)
public TemplateInstance get(@PathParam("name") String name) {
return automaton.data("automaton", new Automaton(name, new User("")));
}
}
......@@ -46,10 +46,8 @@ public class AutomatonSocket {
AutomatonManager am = new AutomatonManager();
am.createAutomaton("asss", new User("reeee"));
String username = "Hans";
String[] msg = message.split(" ");
if (msg[0].startsWith("automaton")) {
if (msg[1].contains("add")) {}
}
// String[] msg = message.split(" ");
session.getAsyncRemote().sendText("Yikes");
}
private void broadcast(String message) {
......
......@@ -11,50 +11,102 @@
content="A simple tool to create Automatons together.">
</head>
<body>
<!-- Context Menus -->
<div class="hide" id="field-menu">
<ul>
<li>
<a id="createState">New State</a>
</li>
</ul>
</div>
<div class="hide" id="state-menu">
<ul>
<li>
<a id="removeState">Remove</a>
</li>
<li>
<a id="editState">Edit</a>
</li>
<li>
<a id="addTransition">Add Transition</a>
</li>
</ul>
</div>
<!-- NavBar -->
<ul>
<li><a>Aut0m4t0n</a></li>
<li><a>+</a></li>
<li><a>//</a></li>
<li><a href="automaton/test">test</a></li>
</ul>
<div class="content">
<ul class="menu">
<li><a>Functions</a></li>
<li>
<form id="nameForm">
<label for="stateName">State name:</label>
<input type="text" id="stateName" name="stateName" disabled>
</form>
</li>
<li class="right"><a>Σ:</a></li>
<li class="right"><a id="states">Q: {}</a></li>
<li class="right"><a>δ:</a></li>
</ul>
<canvas id="canvas" width="1" height="1"></canvas>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus
est Lorem ipsum dolor sit amet.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel
illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui
blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum
dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut
aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit
esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et
iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait
nulla facilisi.
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim
placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea
commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel
illum dolore eu feugiat nulla facilisis.
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos
erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no
rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum
dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat.
Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor
sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem
ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus
est Lorem ipsum dolor sit amet.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel
illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui
blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum
dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut
aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit
esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et
iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait
nulla facilisi.
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim
placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea
commodo
</p>
</div>
<script src="main.js"></script>
</body>
</html>
\ No newline at end of file
......@@ -11,7 +11,7 @@ class Field {
document.getElementById("createState").addEventListener("mousedown", (event) => {
let x = event.clientX - field.xOrigin + window.pageXOffset;
let y = event.clientY - field.yOrigin + window.pageYOffset;
this.addState(x, y, "q1");
this.addState(x, y, "q");
});
document.getElementById("addTransition").addEventListener("mousedown", () => {
transitionMode = true;
......@@ -39,12 +39,15 @@ class Field {
return this.states[i];
}
drawLineTo(origin, x, y, curve) {
this.context.save();
this.context.globalCompositeOperation = "destination-over";
this.context.strokeStyle = getComputedStyle(document.documentElement).getPropertyValue('--main-ac-color');
this.context.beginPath();
this.context.moveTo(origin.x, origin.y);
this.context.lineWidth = 5;
this.context.lineTo(x, y);
this.context.stroke();
this.context.restore();
}
rePaint() {
this.canvas.height = 1000;
......@@ -197,3 +200,13 @@ let contextMenu;
let selected;
let lastSelected;
const field = new Field();
let webSocket = new WebSocket('ws://' + window.location.host + "/websocket");
webSocket.onopen = function () {
webSocket.send("{object: 'automaton', command: 'join', id: 'test'");
};
webSocket.onerror = function (event) {
console.error(event);
};
webSocket.onmessage = function (message) {
console.log(message);
};
......@@ -15,7 +15,7 @@ class Field {
document.getElementById("createState").addEventListener("mousedown", (event: MouseEvent) => {
let x = event.clientX - field.xOrigin + window.pageXOffset
let y = event.clientY - field.yOrigin + window.pageYOffset
this.addState(x, y, "q1")
this.addState(x, y, "q")
});
document.getElementById("addTransition").addEventListener("mousedown", () => {
transitionMode = true
......@@ -48,6 +48,8 @@ class Field {
}
drawLineTo(origin: State, x: number, y: number, curve: number) {
this.context.save()
this.context.globalCompositeOperation = "destination-over"
this.context.strokeStyle = getComputedStyle(document.documentElement).getPropertyValue('--main-ac-color')
this.context.beginPath()
this.context.moveTo(origin.x, origin.y)
......@@ -57,6 +59,7 @@ class Field {
// this.context.bezierCurveTo(orig.x / curve, orig.y * curve, x / curve, y * curve, x, y)
// this.context.quadraticCurveTo(((orig.x - x) / 2 + x) * curve, ((orig.y - y) / 2 + y) * curve, x, y)
this.context.stroke()
this.context.restore()
}
rePaint() {
......@@ -236,12 +239,14 @@ let lastSelected: number
const field: Field = new Field();
// let webSocket = new WebSocket(
// 'ws://' + window.location.host + "/websocket");
// webSocket.onopen = function (event) {
// console.log("connected")
// webSocket.send("automaton new 'cool name'")
// };
// webSocket.onerror = function (event) {
// console.error(event)
// }
\ No newline at end of file
let webSocket = new WebSocket(
'ws://' + window.location.host + "/websocket");
webSocket.onopen = function () {
webSocket.send("{object: 'automaton', command: 'join', id: 'test'")
};
webSocket.onerror = function (event) {
console.error(event)
}
webSocket.onmessage = function (message) {
console.log(message)
}
\ No newline at end of file
......@@ -3,9 +3,59 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{automaton.name}</title>
<title>Aut0m4t0n // {automaton.name}</title>
<link rel="stylesheet" type="text/css" href="/main.css">
<link href="https://fonts.googleapis.com/css?family=Dancing+Script|Tomorrow&display=swap"
rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
content="A simple tool to create Automatons together.">
</head>
<body>
<!-- Context Menus -->
<div class="hide" id="field-menu">
<ul>
<li>
<a id="createState">New State</a>
</li>
</ul>
</div>
<div class="hide" id="state-menu">
<ul>
<li>
<a id="removeState">Remove</a>
</li>
<li>
<a id="editState">Edit</a>
</li>
<li>
<a id="addTransition">Add Transition</a>
</li>
</ul>
</div>
<!-- NavBar -->
<ul>
<li><a>Aut0m4t0n</a></li>
<li><a>+</a></li>
</ul>
<div class="content">
<ul class="menu">
<li><a>Functions</a></li>
<li>
<form id="nameForm">
<label for="stateName">State name:</label>
<input type="text" id="stateName" name="stateName" disabled>
</form>
</li>
<li class="right"><a>Σ:</a></li>
<li class="right"><a id="states">Q: {}</a></li>
<li class="right"><a>δ:</a></li>
</ul>
<canvas id="canvas" width="1" height="1"></canvas>
</div>
<script src="/main.js"></script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment