From 2d9f2820ee62b4697892945d8efdd584db1af5f6 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 7 Feb 2019 12:18:22 +0400 Subject: [PATCH] Decrease animatino duration and popover not showing fix --- src/common/constants.js | 6 +++--- src/driver.scss | 4 ++-- src/index.js | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/constants.js b/src/common/constants.js index 82c9116..5f29118 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -28,12 +28,12 @@ export const CLASS_NEXT_STEP_BTN = 'driver-next-btn'; export const CLASS_PREV_STEP_BTN = 'driver-prev-btn'; export const CLASS_BTN_DISABLED = 'driver-disabled'; -// It must match the one set in the animations in CSS file -export const ANIMATION_DURATION_MS = 400; +// NOTE: It must match the one set in the animations in CSS file +export const ANIMATION_DURATION_MS = 300; // language=HTML export const POPOVER_HTML = (className = '') => ` -
+
Popover Title
Popover Description
diff --git a/src/driver.scss b/src/driver.scss index 28187d0..5791aac 100644 --- a/src/driver.scss +++ b/src/driver.scss @@ -9,9 +9,9 @@ $overlay-z-index: 100002 !default; $stage-z-index: 100003 !default; $highlighted-element-z-index: 100004 !default; -// If you update this duration, make sure to +// Note: If you update this duration, make sure to // update `ANIMATION_DURATION_MS` constant -$animation-ms: 400 !default; +$animation-ms: 300 !default; $animation-sec: ($animation-ms / 1000) * 1s !default; div#driver-popover-item { diff --git a/src/index.js b/src/index.js index 42c54fc..687f4c4 100644 --- a/src/index.js +++ b/src/index.js @@ -417,7 +417,6 @@ export default class Driver { } this.isActivated = true; - this.currentStep = index; this.overlay.highlight(this.steps[index]); } -- GitLab