Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GeoVistoogsi
AR
Commits
9b194f1b
Commit
9b194f1b
authored
2 months ago
by
Cantuerk
Browse files
Options
Download
Email Patches
Plain Diff
Update public/ar_main.js, public/style.css
parent
43a08e42
master
1 merge request
!186
Update public/ar_main.js, public/style.css
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/ar_main.js
+22
-13
public/ar_main.js
public/style.css
+12
-20
public/style.css
with
34 additions
and
33 deletions
+34
-33
public/ar_main.js
+
22
-
13
View file @
9b194f1b
...
...
@@ -345,6 +345,8 @@ function updateScale(percentValue, minScale, maxScale) {
}
}
let
moveDelta
=
0.1
;
// Standardwert für die Verschiebungsgröße, kann mit dem Slider geändert werden
function
openMoveMenu
()
{
if
(
!
selectedPlacedModel
)
{
console
.
log
(
"
Kein Modell ausgewählt. Bitte wählen Sie ein Modell aus, bevor Sie es bewegen.
"
);
...
...
@@ -353,22 +355,29 @@ function openMoveMenu() {
const
dynamicMenu
=
document
.
getElementById
(
"
dynamic-menu
"
);
dynamicMenu
.
style
.
display
=
"
flex
"
;
dynamicMenu
.
innerHTML
=
`
<div id="move-menu">
<h3>Modell bewegen</h3>
<div id="button-controls">
<button id="up" onclick="moveModelDynamic('z', -0.1)">↑</button>
<div class="middle-row">
<button id="left" onclick="moveModelDynamic('x', -0.1)">←</button>
<div class="spacer"></div>
<button id="right" onclick="moveModelDynamic('x', 0.1)">→</button>
</div>
<button id="down" onclick="moveModelDynamic('z', 0.1)">↓</button>
<h3>Position anpassen</h3>
<label>Verschiebungsgröße: <span id="move-delta-display">
${
moveDelta
.
toFixed
(
2
)}
</span>
<input type="range" min="0.01" max="1.0" step="0.01" value="
${
moveDelta
}
" onchange="updateMoveDelta(this.value)"></label>
<div id="button-controls">
<button class="control-button" id="up" onclick="moveModelDynamic('z', -moveDelta)">↑</button>
<div class="middle-row">
<button class="control-button" id="left" onclick="moveModelDynamic('x', -moveDelta)">←</button>
<div class="spacer"></div>
<button class="control-button" id="right" onclick="moveModelDynamic('x', moveDelta)">→</button>
</div>
<button
onclick="closeDynamicMenu()">Zurück
</button>
<button
class="control-button" id="down" onclick="moveModelDynamic('z', moveDelta)">↓
</button>
</div>
`
;
<button onclick="closeDynamicMenu()">Zurück</button>
`
;
}
function
updateMoveDelta
(
value
)
{
moveDelta
=
parseFloat
(
value
);
const
moveDeltaDisplay
=
document
.
getElementById
(
"
move-delta-display
"
);
if
(
moveDeltaDisplay
)
{
moveDeltaDisplay
.
textContent
=
moveDelta
.
toFixed
(
2
);
}
}
function
moveModelDynamic
(
axis
,
value
)
{
...
...
This diff is collapsed.
Click to expand it.
public/style.css
+
12
-
20
View file @
9b194f1b
...
...
@@ -240,34 +240,26 @@ button:active {
/* Style für Move Menu */
#
move-menu
{
#
button-controls
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
gap
:
16
px
;
gap
:
2
px
;
}
#move-menu
#button-controls
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
gap
:
8px
;
}
#move-menu
.middle-row
{
#button-controls
.middle-row
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
8
px
;
gap
:
2
px
;
}
#
move-menu
button
{
width
:
5
0px
;
height
:
5
0px
;
#
button-controls
.control-
button
{
width
:
4
0px
;
height
:
4
0px
;
border
:
none
;
border-radius
:
8
px
;
border-radius
:
5
px
;
background-color
:
#007BFF
;
color
:
white
;
font-size
:
18px
;
...
...
@@ -275,11 +267,11 @@ button:active {
transition
:
background-color
0.3s
,
transform
0.2s
;
}
#
move-menu
button
:active
{
#
button-controls
.control-
button
:active
{
background-color
:
#0056b3
;
transform
:
scale
(
0.95
);
}
#move-menu
.spacer
{
width
:
50px
;
/* Platzhalter für die Lücke zwischen den Buttons */
}
\ No newline at end of file
#button-controls
.spacer
{
width
:
40px
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets