Skip to content

Commit 9407116

Browse files
committed
Add jsconfig.json and fix vls diagnostic warnings
Signed-off-by: ktprograms <[email protected]>
1 parent 3ecc122 commit 9407116

File tree

4 files changed

+70158
-8
lines changed

4 files changed

+70158
-8
lines changed

js/viewer-main.js

+70,142-3
Large diffs are not rendered by default.

js/viewer-main.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsconfig.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"checkJs": true
4+
}
5+
}

src/components/Images.vue

+10-4
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default {
117117
/**
118118
* Manually retrieve the path and return its base64
119119
*
120-
* @returns {String}
120+
* @returns {Promise<String>}
121121
*/
122122
async getBase64FromImage() {
123123
const file = await axios.get(this.davPath)
@@ -128,8 +128,8 @@ export default {
128128
* Handle zooming
129129
* Code based on https://stackoverflow.com/a/46833254/15603854
130130
*
131-
* @param {Event} event the scroll event
132-
* @returns {null}
131+
* @param {WheelEvent} event the scroll event
132+
* @returns {void}
133133
*/
134134
updateZoom(event) {
135135
const isZoomIn = event.deltaY < 0
@@ -171,7 +171,7 @@ export default {
171171
/**
172172
* Dragging handlers
173173
*
174-
* @param {Event} event the event
174+
* @param {MouseEvent} event the event
175175
*/
176176
dragStart(event) {
177177
this.dragX = event.clientX
@@ -180,13 +180,19 @@ export default {
180180
this.$el.onmouseup = this.dragEnd
181181
this.$el.onmousemove = this.dragHandler
182182
},
183+
/**
184+
* @param {MouseEvent} event the event
185+
*/
183186
dragEnd(event) {
184187
event.preventDefault()
185188

186189
this.dragging = false
187190
this.$el.onmouseup = null
188191
this.$el.onmousemove = null
189192
},
193+
/**
194+
* @param {MouseEvent} event the event
195+
*/
190196
dragHandler(event) {
191197
const { clientX, clientY } = event
192198

0 commit comments

Comments
 (0)