Fixes alignment bug
This commit is contained in:
@@ -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