kamrify commited on
Commit
7af127c
·
1 Parent(s): 2f7f50d

Update animation speed

Browse files
Files changed (3) hide show
  1. src/common/constants.js +1 -1
  2. src/core/element.js +1 -1
  3. src/driver.scss +10 -10
src/common/constants.js CHANGED
@@ -22,7 +22,7 @@ export const CLASS_PREV_STEP_BTN = 'driver-prev-btn';
22
  export const CLASS_BTN_DISABLED = 'driver-disabled';
23
 
24
  // It must match the one set in the animations in CSS file
25
- export const ANIMATION_DURATION_MS = 200;
26
 
27
  // language=HTML
28
  export const POPOVER_HTML = `
 
22
  export const CLASS_BTN_DISABLED = 'driver-disabled';
23
 
24
  // It must match the one set in the animations in CSS file
25
+ export const ANIMATION_DURATION_MS = 400;
26
 
27
  // language=HTML
28
  export const POPOVER_HTML = `
src/core/element.js CHANGED
@@ -231,7 +231,7 @@ export default class Element {
231
  const showAtPosition = this.getCalculatedPosition();
232
 
233
  // For first highlight, show it immediately because there won't be any animation
234
- const animationDuration = !this.overlay.lastHighlightedElement ? 0 : ANIMATION_DURATION_MS * 2;
235
 
236
  this.animationTimeout = this.window.setTimeout(() => {
237
  this.popover.show(showAtPosition);
 
231
  const showAtPosition = this.getCalculatedPosition();
232
 
233
  // For first highlight, show it immediately because there won't be any animation
234
+ const animationDuration = !this.overlay.lastHighlightedElement ? 0 : ANIMATION_DURATION_MS;
235
 
236
  this.animationTimeout = this.window.setTimeout(() => {
237
  this.popover.show(showAtPosition);
src/driver.scss CHANGED
@@ -120,11 +120,11 @@ div#driver-page-overlay {
120
  z-index: 100002 !important;
121
 
122
  // If you update this duration, make sure to update `ANIMATION_DURATION_MS` constant
123
- -webkit-transition: all 0.2s;
124
- -moz-transition: all 0.2s;
125
- -ms-transition: all 0.2s;
126
- -o-transition: all 0.2s;
127
- transition: all 0.2s;
128
  }
129
 
130
  div#driver-highlighted-element-stage {
@@ -138,11 +138,11 @@ div#driver-highlighted-element-stage {
138
  display: none;
139
 
140
  // If you update this duration, make sure to update `ANIMATION_DURATION_MS` constant
141
- -webkit-transition: all 0.2s;
142
- -moz-transition: all 0.2s;
143
- -ms-transition: all 0.2s;
144
- -o-transition: all 0.2s;
145
- transition: all 0.2s;
146
  }
147
 
148
  .driver-highlighted-element {
 
120
  z-index: 100002 !important;
121
 
122
  // If you update this duration, make sure to update `ANIMATION_DURATION_MS` constant
123
+ -webkit-transition: all 0.4s;
124
+ -moz-transition: all 0.4s;
125
+ -ms-transition: all 0.4s;
126
+ -o-transition: all 0.4s;
127
+ transition: all 0.4s;
128
  }
129
 
130
  div#driver-highlighted-element-stage {
 
138
  display: none;
139
 
140
  // If you update this duration, make sure to update `ANIMATION_DURATION_MS` constant
141
+ -webkit-transition: all 0.4s;
142
+ -moz-transition: all 0.4s;
143
+ -ms-transition: all 0.4s;
144
+ -o-transition: all 0.4s;
145
+ transition: all 0.4s;
146
  }
147
 
148
  .driver-highlighted-element {