Fixes alignment bug
This commit is contained in:
1 parent
c43ce4870c
commit
aba8d64bed
1 file changed
+12
-10
@@ -29,19 +29,21 @@
|
||||
_x: 0, _y: 0,
|
||||
get_pos() {
|
||||
stored_position = JSON.parse(localStorage.getItem("position"));
|
||||
if (stored_position != null) {
|
||||
if (stored_position == null) {
|
||||
localStorage.removeItem("position")
|
||||
position.x = 0;
|
||||
position.y = 0;
|
||||
} else {
|
||||
position.x = stored_position.x
|
||||
position.y = stored_position.y
|
||||
document.getElementById("main-window").style.transform =
|
||||
}
|
||||
document.getElementById("main-window").style.transform =
|
||||
`translate(${position.x}px, ${position.y}px)`
|
||||
clippy = document.getElementById("clippy")
|
||||
if (clippy) {
|
||||
clippy.style.transform =
|
||||
`translate(${position.x}px, ${position.y}px)`
|
||||
clippy = document.getElementById("clippy")
|
||||
if (clippy) {
|
||||
clippy.style.transform =
|
||||
`translate(${position.x}px, ${position.y}px)`
|
||||
clippy.classList.remove('hide');
|
||||
}
|
||||
} else {
|
||||
localStorage.removeItem("position")
|
||||
clippy.classList.remove('hide');
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
|
||||
Reference in new issue
Block a user