Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: lib/paper_tooltip.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/paper_toggle_button_nodart.html ('k') | lib/src/firebase-element/.travis.yml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update`
2 2
3 /// Dart API for the polymer element `paper_tooltip`. 3 /// Dart API for the polymer element `paper_tooltip`.
4 @HtmlImport('paper_tooltip_nodart.html') 4 @HtmlImport('paper_tooltip_nodart.html')
5 library polymer_elements.lib.src.paper_tooltip.paper_tooltip; 5 library polymer_elements.lib.src.paper_tooltip.paper_tooltip;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:js' show JsArray, JsObject; 8 import 'dart:js' show JsArray, JsObject;
9 import 'package:web_components/web_components.dart'; 9 import 'package:web_components/web_components.dart';
10 import 'package:polymer_interop/polymer_interop.dart'; 10 import 'package:polymer_interop/polymer_interop.dart';
11 import 'neon_animation_runner_behavior.dart'; 11 import 'neon_animation_runner_behavior.dart';
12 import 'neon_animatable_behavior.dart'; 12 import 'neon_animatable_behavior.dart';
13 import 'neon_animation/animations/fade_in_animation.dart'; 13 import 'neon_animation/animations/fade_in_animation.dart';
14 import 'neon_animation/animations/fade_out_animation.dart'; 14 import 'neon_animation/animations/fade_out_animation.dart';
15 15
16 /// Material design: [Tooltips](https://www.google.com/design/spec/components/to oltips.html)
17 ///
16 /// `<paper-tooltip>` is a label that appears on hover and focus when the user 18 /// `<paper-tooltip>` is a label that appears on hover and focus when the user
17 /// hovers over an element with the cursor or with the keyboard. It will be cent ered 19 /// hovers over an element with the cursor or with the keyboard. It will be cent ered
18 /// to an anchor element specified in the `for` attribute, or, if that doesn't e xist, 20 /// to an anchor element specified in the `for` attribute, or, if that doesn't e xist,
19 /// centered to the parent node containing it. 21 /// centered to the parent node containing it.
20 /// 22 ///
21 /// Example: 23 /// Example:
22 /// 24 ///
23 /// <div style="display:inline-block"> 25 /// <div style="display:inline-block">
24 /// <button>Click me!</button> 26 /// <button>Click me!</button>
25 /// <paper-tooltip>Tooltip text</paper-tooltip> 27 /// <paper-tooltip>Tooltip text</paper-tooltip>
(...skipping 18 matching lines...) Expand all
44 /// ----------------|-------------|---------- 46 /// ----------------|-------------|----------
45 /// `--paper-tooltip-background` | The background color of the tooltip | `#61616 1` 47 /// `--paper-tooltip-background` | The background color of the tooltip | `#61616 1`
46 /// `--paper-tooltip-opacity` | The opacity of the tooltip | `0.9` 48 /// `--paper-tooltip-opacity` | The opacity of the tooltip | `0.9`
47 /// `--paper-tooltip-text-color` | The text color of the tooltip | `white` 49 /// `--paper-tooltip-text-color` | The text color of the tooltip | `white`
48 /// `--paper-tooltip` | Mixin applied to the tooltip | `{}` 50 /// `--paper-tooltip` | Mixin applied to the tooltip | `{}`
49 @CustomElementProxy('paper-tooltip') 51 @CustomElementProxy('paper-tooltip')
50 class PaperTooltip extends HtmlElement with CustomElementProxyMixin, PolymerBase , NeonAnimatableBehavior, NeonAnimationRunnerBehavior { 52 class PaperTooltip extends HtmlElement with CustomElementProxyMixin, PolymerBase , NeonAnimatableBehavior, NeonAnimationRunnerBehavior {
51 PaperTooltip.created() : super.created(); 53 PaperTooltip.created() : super.created();
52 factory PaperTooltip() => new Element.tag('paper-tooltip'); 54 factory PaperTooltip() => new Element.tag('paper-tooltip');
53 55
56 /// The entry and exit animations that will be played when showing and
57 /// hiding the tooltip. If you want to override this, you must ensure
58 /// that your animationConfig has the exact format below.
54 get animationConfig => jsElement[r'animationConfig']; 59 get animationConfig => jsElement[r'animationConfig'];
55 set animationConfig(value) { jsElement[r'animationConfig'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} 60 set animationConfig(value) { jsElement[r'animationConfig'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;}
56 61
62 /// The delay that will be applied before the `entry` animation is
63 /// played when showing the tooltip.
64 num get animationDelay => jsElement[r'animationDelay'];
65 set animationDelay(num value) { jsElement[r'animationDelay'] = value; }
66
57 /// If true, no parts of the tooltip will ever be shown offscreen. 67 /// If true, no parts of the tooltip will ever be shown offscreen.
58 bool get fitToVisibleBounds => jsElement[r'fitToVisibleBounds']; 68 bool get fitToVisibleBounds => jsElement[r'fitToVisibleBounds'];
59 set fitToVisibleBounds(bool value) { jsElement[r'fitToVisibleBounds'] = value; } 69 set fitToVisibleBounds(bool value) { jsElement[r'fitToVisibleBounds'] = value; }
60 70
61 /// The id of the element that the tooltip is anchored to. This element 71 /// The id of the element that the tooltip is anchored to. This element
62 /// must be a sibling of the tooltip. 72 /// must be a sibling of the tooltip.
63 String get forId => jsElement[r'for']; 73 String get forId => jsElement[r'for'];
64 set forId(String value) { jsElement[r'for'] = value; } 74 set forId(String value) { jsElement[r'for'] = value; }
65 75
66 /// This property is deprecated, but left over so that it doesn't 76 /// This property is deprecated, but left over so that it doesn't
(...skipping 18 matching lines...) Expand all
85 95
86 hide() => 96 hide() =>
87 jsElement.callMethod('hide', []); 97 jsElement.callMethod('hide', []);
88 98
89 show() => 99 show() =>
90 jsElement.callMethod('show', []); 100 jsElement.callMethod('show', []);
91 101
92 updatePosition() => 102 updatePosition() =>
93 jsElement.callMethod('updatePosition', []); 103 jsElement.callMethod('updatePosition', []);
94 } 104 }
OLDNEW
« no previous file with comments | « lib/paper_toggle_button_nodart.html ('k') | lib/src/firebase-element/.travis.yml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698