summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/feature_highlight/feature_highlight.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/feature_highlight/feature_highlight.js')
-rw-r--r--app/assets/javascripts/feature_highlight/feature_highlight.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/feature_highlight/feature_highlight.js b/app/assets/javascripts/feature_highlight/feature_highlight.js
index f5e38fc8879..800ca05cd11 100644
--- a/app/assets/javascripts/feature_highlight/feature_highlight.js
+++ b/app/assets/javascripts/feature_highlight/feature_highlight.js
@@ -9,12 +9,12 @@ import {
mouseleave,
} from './feature_highlight_helper';
-export const setupFeatureHighlightPopover = (id) => {
+export const setupFeatureHighlightPopover = (id, debounceTimeout = 300) => {
const $selector = $(getSelector(id));
const $parent = $selector.parent();
const $popoverContent = $parent.siblings('.feature-highlight-popover-content');
const hideOnScroll = hidePopover.bind($selector);
- const debouncedMouseleave = _.debounce(mouseleave, 300);
+ const debouncedMouseleave = _.debounce(mouseleave, debounceTimeout);
$selector
// Setup popover
@@ -54,5 +54,8 @@ export const highlightFeatures = (highlightOrder) => {
if (featureId) {
setupFeatureHighlightPopover(featureId);
+ return true;
}
+
+ return false;
};