Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit fca76f7

Browse files
committed
Small code adjustments
1 parent 90be78d commit fca76f7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dist/basicContext.min.js

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

src/scripts/basicContext.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ const getPosition = function(e, elem) {
135135

136136
// Get size of browser
137137
let browser = {
138-
width : window.innerWidth,
139-
height : window.innerHeight
138+
width : window.innerWidth,
139+
height : window.innerHeight
140140
}
141141

142142
// Get size of context
@@ -214,13 +214,13 @@ const show = function(data, e, fnClose, fnCallback) {
214214
// Bind click on items
215215
for (let i = 0; i < data.length; ++i) bind(data[i])
216216

217-
// Call callback when available
218-
if (fnCallback!=null) fnCallback()
219-
220217
// Do not trigger default event or further propagation
221218
if (typeof e.preventDefault === 'function') e.preventDefault()
222219
if (typeof e.stopPropagation === 'function') e.stopPropagation()
223220

221+
// Call callback when available
222+
if (fnCallback!=null) fnCallback()
223+
224224
return true
225225

226226
}

0 commit comments

Comments
 (0)