Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit b630530

Browse files
committed
fix CS
1 parent b28d7ae commit b630530

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

Chapter_05/lib/tooltip/tooltip_directive.dart

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ import 'package:angular/angular.dart';
77
@NgDirective(
88
selector: '[tooltip]',
99
map: const {
10-
'tooltip': '=>displayModel'
10+
'tooltip': '=>displayModel'
1111
}
1212
)
1313
class Tooltip {
14-
// not sure which one I will need.
15-
// ng-click uses node.
16-
// ng-show-hide uses element.
1714
dom.Element element;
1815
dom.Node node;
1916
Scope scope;
@@ -54,23 +51,23 @@ class Tooltip {
5451
..borderRadius = "5px"
5552
..width = "${displayModel.imgWidth.toString()}px";
5653

57-
// find the coordinates of the parent DOM element
54+
// find the coordinates of the parent DOM element
5855
Rectangle bounds = element.getBoundingClientRect();
5956
int left = (bounds.left + dom.window.pageXOffset).toInt();
6057
int top = (bounds.top + dom.window.pageYOffset).toInt();
6158
int width = bounds.width.toInt();
6259
int height = bounds.height.toInt();
6360

64-
// position the tooltip.
65-
// Figure out where the containing element sits in the window.
61+
// position the tooltip.
62+
// Figure out where the containing element sits in the window.
6663
tooltipElem.style
6764
..position = "absolute"
6865
..top = "${top - height}px"
6966
..left = "${left + width + 10}px";
7067

71-
// Add the tooltip to the document body. We add it here because
72-
// we need to position it absolutely, without reference to its
73-
// parent element.
68+
// Add the tooltip to the document body. We add it here because
69+
// we need to position it absolutely, without reference to its
70+
// parent element.
7471
dom.document.body.append(tooltipElem);
7572
}
7673

0 commit comments

Comments
 (0)