General improvements
This commit is contained in:
147
index.html
147
index.html
@@ -30,7 +30,7 @@
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
input {
|
||||
input:not([type=checkbox]) {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding: 8px 16px;
|
||||
@@ -44,6 +44,11 @@
|
||||
background-color: rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Buttons
|
||||
*/
|
||||
@@ -127,7 +132,7 @@
|
||||
|
||||
.action-button {
|
||||
background: #fff;
|
||||
margin: 0 8px;
|
||||
margin: 4px 8px;
|
||||
}
|
||||
|
||||
.action-button .fa {
|
||||
@@ -189,7 +194,7 @@
|
||||
.upload-btn .upload-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Canvas
|
||||
*/
|
||||
@@ -199,11 +204,109 @@
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
#previewImage {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.explanation {
|
||||
max-width: 800px;
|
||||
margin: 10px auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Context Menu
|
||||
*/
|
||||
|
||||
.contextmenu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: none;
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(0, 0, 0, .33);
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, .15);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
min-width: 150px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.contextmenu > li {
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.contextmenu > li:first-child {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
|
||||
.contextmenu > li:last-child {
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
.contextmenu > li:hover {
|
||||
background: rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.contextmenu > li:active {
|
||||
background: rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Drag Overlay
|
||||
*/
|
||||
|
||||
#dragOverlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, .75);
|
||||
padding: 20px;
|
||||
color: #fff;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-transition: opacity .25s;
|
||||
-moz-transition: opacity .25s;
|
||||
-ms-transition: opacity .25s;
|
||||
-o-transition: opacity .25s;
|
||||
transition: opacity .25s;
|
||||
}
|
||||
|
||||
#dragOverlay.visible {
|
||||
opacity: 1;
|
||||
pointer-events: all;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#dragOverlay .border {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
border: 4px dashed white;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#dragOverlay .content {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -235,7 +338,43 @@
|
||||
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
<div class="explanation">
|
||||
|
||||
<p>Oben befindet sich der sogenannter FSM-Designer. Dieser ermöglicht es unter anderem deterministische endliche Automaten zu erstellen.</p>
|
||||
|
||||
<p>Funktionsweise:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>Zustand hinzufügen:</b> Doppelklick</li>
|
||||
<li><b>Übergang hinzufügen:</b> <code>Shift</code> gedrückt halten und mit linker Maustaste ziehen</li>
|
||||
<li><b>Verschieben:</b> klassisches Drag'n'drop</li>
|
||||
<li><b>Endzustand:</b> Doppelklick auf einen bestehenden Zustand</li>
|
||||
<li><b>Index:</b> Unterstrich vor eine Zahl hinzufügen (z.B. <code>q_0</code>)</li>
|
||||
<li><b>Griechischer Buchstabe:</b> Name des Buchstaben mit Backslash (z.B. <code>\epsilon</code>)</li>
|
||||
</ul>
|
||||
|
||||
<p>Diese Anwendung wurde mithilfe von HTML5 Canvas und JavaScript ECMA2016 erstellt.</p>
|
||||
|
||||
<p>Der Source Code ist open source auf <a href="https://git.kingofdog.eu/KingOfDog/fsm-designer">Gitea</a> verfügbar (demnächst womöglich auch über Github).</p>
|
||||
|
||||
<p>Made with <i class="fa fa-heart"></i> by <a href="https://kingofdog.eu">KingOfDog</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<ul id="contextmenuCanvas" class="contextmenu">
|
||||
<li>Test</li>
|
||||
</ul>
|
||||
|
||||
<div id="dragOverlay">
|
||||
<div class="border"></div>
|
||||
<div class="content">
|
||||
<h1>Datei ablegen (.fsm)</h1>
|
||||
<h3>Dokument importieren und weiterarbeiten!</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="lib/tingle/tingle.min.js"></script>
|
||||
<script src="lib/contextmenu.js/contextMenu.min.js"></script>
|
||||
|
||||
<script src="js/math.js"></script>
|
||||
<script src="js/export/export.js"></script>
|
||||
@@ -245,7 +384,7 @@
|
||||
<script src="js/components/self-connection.js"></script>
|
||||
<script src="js/components/temporary-connection.js"></script>
|
||||
<script src="js/components/state.js"></script>
|
||||
<script src="js/FSMDocument.js"></script>
|
||||
<script src="js/fsm-document.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script src="js/simulate.js"></script>
|
||||
<script src="js/menu.js"></script>
|
||||
|
Reference in New Issue
Block a user