mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-10-31 03:52:13 +08:00
Fix - Positioning the popover on scrollable elements
* (feat) - add getter for steps property * (feat) - add setter for steps property / remove duplicate typing * (fix) - remove duplicated 'currentModePrevented' type * (fix) - merge * merge fix * (fix) - move all methods after scroll detection - success ! * Refactor highlighting active element
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+7
-5
@@ -190,15 +190,17 @@ export default class Element {
|
||||
* @public
|
||||
*/
|
||||
onHighlighted() {
|
||||
this.showPopover();
|
||||
this.showStage();
|
||||
|
||||
this.addHighlightClasses();
|
||||
|
||||
const highlightedElement = this;
|
||||
if (!highlightedElement.isInView()) {
|
||||
highlightedElement.bringInView();
|
||||
}
|
||||
|
||||
// Show the popover and stage once the item has been
|
||||
// brought in the view, this would allow us to handle
|
||||
// the cases where the container has scroll overflow
|
||||
this.showPopover();
|
||||
this.showStage();
|
||||
this.addHighlightClasses();
|
||||
|
||||
if (this.options.onHighlighted) {
|
||||
this.options.onHighlighted(this);
|
||||
|
||||
Reference in New Issue
Block a user