Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Import overlay constants instead of hardcoding strings everywhere.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 199415134
  • Loading branch information
cissyshi authored and nshahan committed Jun 12, 2018
1 parent 22fbad2 commit 02406bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/src/laminate/popup/popup_hierarchy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:html';

import 'package:angular/angular.dart';
import 'package:angular_components/laminate/overlay/constants.dart';
import 'package:angular_components/utils/browser/events/events.dart' as events;

/// Tracks a hierarchy of visible popup and provides it closing logic.
Expand Down Expand Up @@ -62,8 +63,8 @@ class PopupHierarchy {
// created by another app using ACX.
// TODO(google): Find a way to compute it only when needed and make it
// globally accessible.
var modalPanes =
document.querySelectorAll('.acx-overlay-container .pane.modal.visible');
var modalPanes = document
.querySelectorAll('.$overlayContainerClassName .pane.modal.visible');
if (modalPanes.isNotEmpty) {
if (useMultiModalDismissal) {
// Only close popups that belong to the currently visible modal or whose
Expand Down
3 changes: 2 additions & 1 deletion lib/src/material_tooltip/tooltip_target.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:html';

import 'package:angular/angular.dart';
import 'package:angular_components/laminate/overlay/constants.dart';
import 'package:angular_components/laminate/popup/popup.dart';
import 'package:angular_components/src/material_tooltip/tooltip_controller.dart';
import 'package:angular_components/model/action/delayed_action.dart';
Expand Down Expand Up @@ -163,7 +164,7 @@ class ClickableTooltipTargetDirective extends TooltipBehavior
// Don't hide the tooltip if focus went to an element inside the tooltip.
HtmlElement el;
for (el = event.relatedTarget; el.parent != null; el = el.parent) {
if (el.className == "acx-overlay-container") return;
if (el.className == overlayContainerClassName) return;
}

hideTooltip(immediate: true);
Expand Down

0 comments on commit 02406bc

Please sign in to comment.