Minor refactoring
Browse files- src/common/constants.js +2 -0
- src/core/element.js +2 -2
src/common/constants.js
CHANGED
@@ -10,6 +10,8 @@ export const ID_OVERLAY = 'driver-page-overlay';
|
|
10 |
export const ID_STAGE = 'driver-highlighted-element-stage';
|
11 |
export const ID_POPOVER = 'driver-popover-item';
|
12 |
|
|
|
|
|
13 |
export const CLASS_POPOVER_TIP = 'driver-popover-tip';
|
14 |
export const CLASS_POPOVER_TITLE = 'driver-popover-title';
|
15 |
export const CLASS_POPOVER_DESCRIPTION = 'driver-popover-description';
|
|
|
10 |
export const ID_STAGE = 'driver-highlighted-element-stage';
|
11 |
export const ID_POPOVER = 'driver-popover-item';
|
12 |
|
13 |
+
export const DRIVER_HIGHLIGHTED_ELEMENT = 'driver-highlighted-element';
|
14 |
+
|
15 |
export const CLASS_POPOVER_TIP = 'driver-popover-tip';
|
16 |
export const CLASS_POPOVER_TITLE = 'driver-popover-title';
|
17 |
export const CLASS_POPOVER_DESCRIPTION = 'driver-popover-description';
|
src/core/element.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import Position from './position';
|
2 |
-
import { ANIMATION_DURATION_MS } from
|
3 |
|
4 |
/**
|
5 |
* Wrapper around DOMElements to enrich them
|
@@ -140,7 +140,7 @@ export default class Element {
|
|
140 |
onDeselected() {
|
141 |
this.hidePopover();
|
142 |
|
143 |
-
this.node.classList.remove(
|
144 |
|
145 |
this.highlightFinished = false;
|
146 |
|
|
|
1 |
import Position from './position';
|
2 |
+
import { ANIMATION_DURATION_MS, DRIVER_HIGHLIGHTED_ELEMENT } from '../common/constants';
|
3 |
|
4 |
/**
|
5 |
* Wrapper around DOMElements to enrich them
|
|
|
140 |
onDeselected() {
|
141 |
this.hidePopover();
|
142 |
|
143 |
+
this.node.classList.remove(DRIVER_HIGHLIGHTED_ELEMENT);
|
144 |
|
145 |
this.highlightFinished = false;
|
146 |
|