Skip to content

Commit

Permalink
Lint fix some files
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Sep 17, 2024
1 parent ce94ea1 commit db7d69a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/ConceptListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export default {
parent = parent.parentElement
}
// Scroll element
var options = {
const options = {
container: parent,
easing: "ease-in",
offset: -20,
Expand Down
10 changes: 5 additions & 5 deletions src/components/ConceptSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ export default {
],
handler: () => {
if (!this.filterPopoverShow) {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.isOpen = false
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.searchSelected = -1
}
},
Expand All @@ -278,7 +278,7 @@ export default {
this.$refs.filterPopover,
],
handler: () => {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.filterPopoverShow = false
},
},
Expand Down Expand Up @@ -387,8 +387,8 @@ export default {
*/
scrollSelectedIntoView() {
let target = document.getElementById(this.uniqueID + "-searchResult-" + this.searchSelected)
var rect = target.getBoundingClientRect()
var parentRect = target.parentElement.parentElement.getBoundingClientRect()
const rect = target.getBoundingClientRect()
const parentRect = target.parentElement.parentElement.getBoundingClientRect()
if (rect.bottom > parentRect.bottom) {
target.scrollIntoView(false)
}
Expand Down
1 change: 0 additions & 1 deletion src/components/MappingBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,6 @@ export default {
document.getElementById("mappingBrowser-search-shareButton"),
],
handler: () => {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.searchShareShow = false
},
})
Expand Down
10 changes: 5 additions & 5 deletions src/mixins/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default {
window.getSelection().removeAllRanges()
// from https://www.sanwebe.com/2014/04/select-all-text-in-element-on-click
const selectText = (el) => {
var sel, range
let sel, range
if (window.getSelection && document.createRange) {
sel = window.getSelection()
if(sel.toString() == "") {
Expand Down Expand Up @@ -306,7 +306,7 @@ export default {
return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom
},
downloadFile(filename, contents) {
var blob = new Blob([contents], {type: "text/plain;charset=utf-8"})
const blob = new Blob([contents], {type: "text/plain;charset=utf-8"})
FileSaver.saveAs(blob, filename)
},
/**
Expand Down Expand Up @@ -360,9 +360,9 @@ export default {
},
// adapted from: https://stackoverflow.com/a/22429679/11050851
hash(str) {
var FNV1_32A_INIT = 0x811c9dc5
var hval = FNV1_32A_INIT
for ( var i = 0; i < str.length; ++i ) {
const FNV1_32A_INIT = 0x811c9dc5
let hval = FNV1_32A_INIT
for ( let i = 0; i < str.length; ++i ) {
hval ^= str.charCodeAt(i)
hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24)
}
Expand Down

0 comments on commit db7d69a

Please sign in to comment.