Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor : Removing JQuery from minimap.js file #233

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions src/components/Extra.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@
height: 100%;
"
></canvas>
<div id="miniMap">
<canvas
id="miniMapArea"
style="position: absolute; left: 0; top: 0; z-index: 3"
></canvas>
</div>

<transition>
<div id="miniMap" style="height: 253px; width: 255px">
<canvas
id="miniMapArea"
style="position: absolute; left: 0; top: 0; z-index: 3"
></canvas>
</div>
</transition>
<div id="Help"></div>
<div
class="sk-folding-cube loadingIcon"
Expand Down Expand Up @@ -320,4 +321,17 @@ import CustomShortcut from './DialogBox/CustomShortcut.vue'
import InsertSubcircuit from './DialogBox/InsertSubcircuit.vue'
import OpenOffline from './DialogBox/OpenOffline.vue'
import ReportIssue from './ReportIssue/ReportIssue.vue'
</script>
</script>

<style>
.v-enter-active,
.v-leave-active {
transition: opacity 0.8s linear;
display: none;
}

.v-enter-from,
.v-leave-to {
opacity: 0;
}
</style>
3 changes: 1 addition & 2 deletions src/simulator/src/minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default miniMapArea = {
},
clear() {
if (lightMode) return
$('#miniMapArea').css('z-index', '-1')
document.getElementById('miniMapArea').style.zIndex = '-1';
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)
},
}
Expand All @@ -189,5 +189,4 @@ export function removeMiniMap() {
)
return
}
$('#miniMap').fadeOut('fast')
}
Loading