clippy check for interact fix
This commit is contained in:
@@ -44,16 +44,15 @@
|
||||
{% block clippy %}{% endblock %}
|
||||
<script>
|
||||
position.get_pos(); // Gets position from localStorage
|
||||
clippy = document.getElementById("clippy")
|
||||
window.addEventListener('load', function () {
|
||||
interact('.main-title-bar').draggable({
|
||||
listeners: {
|
||||
move (event) {
|
||||
position.x += event.dx
|
||||
position.y += event.dy
|
||||
event.target.parentElement.style.transform =
|
||||
`translate(${position.x}px, ${position.y}px)`
|
||||
document.getElementById("clippy").style.transform =
|
||||
`translate(${position.x}px, ${position.y}px)`
|
||||
event.target.parentElement.style.transform = `translate(${position.x}px, ${position.y}px)`
|
||||
if (clippy) document.getElementById("clippy").style.transform = `translate(${position.x}px, ${position.y}px)`
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -67,7 +66,7 @@
|
||||
function resetWindow() {
|
||||
position.reset()
|
||||
document.getElementById("main-window").style.transform = '';
|
||||
document.getElementById("clippy").style.transform = '';
|
||||
if (clippy) document.getElementById("clippy").style.transform = '';
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user