dart-polymer

event in one polymer to change attributes of another polymer, them not having parent child relation

守給你的承諾、 提交于 2019-12-12 01:24:48
问题 An event handler in Polymer element a should change an attribute in Polymer element b . I tried (within a.dart ): - imported b.dart - query selector for element b . - called the function which modifies the value. - the value changes(print)). but not updated on UI. - modified variable is observable a.html <template> <input type="image" src="button_minus_red.gif" on-click="{{removePlayer}}" width = "15" height ="15"> {{playerName}}:{{playerCost}}<br> </template> b.html <template> <h1>Team Size:

Databinding not working in Polymer Dart

笑着哭i 提交于 2019-12-11 23:19:54
问题 The subject line of the question is a bit ambiguous. I have an main entry file to load (entry.html) which uses a entry.dart script. In the entry.html, I use a custom polymer element card-table. cardtable.html is a simple list. When I load the entry.html first time, everything is good.. I see multiple rows of text printed with static data in my model list. My entry.html has a button, clicking which changes the data model (through entry.dart, I invoke the cardtable.dart). I see the right

Insert Input Tag into td tags via templates

﹥>﹥吖頭↗ 提交于 2019-12-11 21:05:20
问题 I have a table and each row does have an edit Button. If that button is pressed all the td tag should have a text input tag containing the values. So two templates for each td would bei Too much. <tr template ... > wont work since the td tags will bei ignored by the Browser, because the tds wont See the table around the template. Tried pretty much everything with template and it didnt work. <table> <tr> <td> td11 </td> <td> td12 </td> <td> <button on-click="{{someFunc}}"/> </td> </tr> <tr>

How to embed the handsontable widget into a polymer-dart webcomponent

房东的猫 提交于 2019-12-11 19:08:38
问题 I try to embed the jquery based handsonetable (http://handsontable.com) ui widget into a polymer-dart webcomponent. The Webcomponent is defined like that: <polymer-element name="my-table"> <template> <div id="table"></div> </template> <script type="application/dart" src="t.dart"></script> </polymer-element> The t.dart: import 'package:polymer/polymer.dart'; import 'dart:js'; var data = [ ["", "VW", "BMW", "Mercedes", "Mini", "Mitsubishi"], ["2012", 2, 2422, 5399, 776, 4151] ]; @CustomTag('my

How to avoid warnings for components registered with document.registerElement

匆匆过客 提交于 2019-12-11 13:36:18
问题 I'm looking to use the github time-elements custom web components in a polymer dart application. They work as expected, however I get the warning: Warning from polymer (Linter) ... custom element with name "relative-time" not found. See http://goo.gl/5HPeuP#polymer_11 for details. Following that link explains the problem pretty well: This warning can also be a false alarm. For instance, when an element is defined programatically using document.registerElement. In that case the polymer build

Construction and ordering of nested and template if= style polymer dart elements?

老子叫甜甜 提交于 2019-12-11 11:09:48
问题 Code for a very small app illustrating these multiple constructor calls is now up on GitHub at https://github.com/Chiba-City/testnest. I am trying to figure out why a polymer element would be constructed twice and what determines the order of construction of polymer elements that contain other polymer elements and why is a "templated out" element using an "if" template constructed at all. Also, if one cannot reproduce these results with three simple polymer elements, one defined to contain or

Is there a way to disable the Polymer error log widget

廉价感情. 提交于 2019-12-11 10:34:17
问题 The error log widget in the bottom/right corner in the browser is very helpful but sometimes I would be nice if it could be disabled. see also How to avoid warnings for components registered with document.registerElement 回答1: There are two options disable the widget transformers: - polymer: inject_build_logs_in_output: false disable the Polymer linter transformers: - polymer: lint: false see also http://dartbug.com/21237 来源: https://stackoverflow.com/questions/28614462/is-there-a-way-to

How do I use HTML5 validations on dart polymer elements?

社会主义新天地 提交于 2019-12-11 09:01:50
问题 I'm trying to create my own custom polymer-element that would enforce a specified input mask. I've created this element: <polymer-element name="phone-input" attributes="phoneNumber"> <template> <form> <input id="txtPhoneNumber" type="text" class="field phone-field" required placeholder="999-999-9999" maxlength="12" value="{{ phoneNumber }}"/> </form> </template> <script type="application/dart" src="phone_input.dart"></script> </polymer-element> As you can see, the input field inside my

polymer selector doesn't fire tab selection change when selected tab is initialised in ready

谁说胖子不能爱 提交于 2019-12-11 08:25:36
问题 Just filed an issue https://github.com/ErikGrimes/polymer_elements/issues/117. Reproducing here. I'm using a polymer-ui-tabs with a polymer-ui-pages and it doesn't reliably change the page when a tab clicked. To reproduce use the code below. Then observe that the Two tab is selected and the Two page is shown click on the Three tab is selected and the Three page is shown click on the Two tab. The content still shows the Three page Repeat with the selectedTab = 1; removed from the dart code.

Preventing the contents of draggable polymer elements from being selectable

一曲冷凌霜 提交于 2019-12-11 08:16:57
问题 I have a polymer element defined as follows <polymer-element name="draggable-list-item" > <template> <core-style ref="draggable-list-item"></core-style> <div id="row-container" draggable="true"> <content></content> </div> </template> <script type="application/dart" src="draggable_list_item.dart"></script> </polymer-element> I know that for normal elements (non polymer / web component) that I need to add a style like [draggable] { -moz-user-select: none; -khtml-user-select: none; -webkit-user