polymer

Polymer 1.0 , Google Chart type=“table” not working

偶尔善良 提交于 2019-12-13 03:47:35
问题 In the given Plunk example, Google "pie" chart is working BUT "table" chart is not working(meaning, "table" chart is in the DOM but it is not visible AND also makes 'pie' to disappear). Both examples are taken from the demo docs where both are working i.e. both are visible. Why 'table' chart is not visible in the Plunk example? <google-chart type="pie" data='[["ID", "Life Expectancy", "Fertility Rate", "Region", "Population"], ["CAN", 80.66, 1.67, "North America", 33739900], ["DEU", 79.84, 1

How do I integrate a Polymer + Node.JS JavaScript app with React + TypeScript

柔情痞子 提交于 2019-12-13 03:36:47
问题 I have recently been tasked with integrating React + TypeScript with an existing starter app that contains many great Polymer Components (Predix UI Starter). I understand that this may seem non-sensical to some (after all, you could simply provide app state and logic using Polymer as a framework ). However, the React library and the object oriented nature of TypeScript have a lot to offer, so what are some tips for getting started here? 回答1: I will be integrating the Predix UI Starter with

Nested Iron Ajax

自古美人都是妖i 提交于 2019-12-13 03:34:37
问题 Ok. So my last post was too ambiguous. For my second post, let me try to approach the same problem in hopefully a little more straighforward manner. Below is the code. Here is a screenshot of the results I get. Regarding the second iron-ajax call, if I use curl in terminal with this () I get what I want (it's a link preview service, so title, img, desc etc). Trying to accomplish the same with iron-ajax post with required parameters defined per spec. I don't get any console errors (for the

Message boxes in Polymer applications

和自甴很熟 提交于 2019-12-13 02:58:48
问题 I am working on my first bigger Polymer application and currently have around 30 components. Most of the components need to be able to display (modal) message boxes. For this I implemented a message box component wrapping paper-dialog (similar to other message box components available). What I don't like is that in every component which wants to display message boxes I need to define an element <my-message-box id="message-box"></my-message-box> and then call it like this this.$["message-box"]

Polymer paper-dialog-scrollable. scroll to the end

风格不统一 提交于 2019-12-13 02:03:21
问题 I use paper-dialog-scrollable. <paper-dialog-scrollable> </paper-dialog-scrollable> How can I make this section to scroll to the end? I looked in the api and their is nothing that I can use. 回答1: You can give the paper-dialog-scrollable some id (e.g mypaperscrollable) and this.mypaperscrollable.$.scrollable.scrollTop = someValueHere You could get the relative position of the last element inside your scrollable and use that as the value for scrollTop 来源: https://stackoverflow.com/questions

Polymer 1.x: How to data bind to a variable boolean attribute?

人盡茶涼 提交于 2019-12-13 02:00:32
问题 Question How do I bind a variable to/as the disabled attribute of a <paper-checkbox> element? Based on the results of my code, it looks like the only way to toggle the disabled property is to include the disabled attribute as a string in the start tag. Surely there must be a way to toggle that as a variable? Link to JSBin http://jsbin.com/zecidojizu/edit?html,output <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Polymer Bin</title> <base href="http://element-party.xyz/"> <script

How to use core-scroll-header-panel with core-list

匆匆过客 提交于 2019-12-13 01:34:41
问题 I'm wanting to use core-scroll-header-panel with core-list so that as I scroll the list the header condenses and disappears. Particularly for mobile that will maximise the space for the list. I took the demo and tried to adapt it for a core-list but failed to get it to scroll the header off the page. My attempts are at http://jsbin.com/sivuvu Any help appreciated. 回答1: Here's one possible solution: <!doctype html> <html> <head> <script src="https://www.polymer-project.org/0.5/webcomponents

Accessing a div inside of a Polymer element template

送分小仙女□ 提交于 2019-12-12 23:07:35
问题 I'm trying to use core-animation on a div, to animate its position. To do that, i have to select it with document.getElementById(). The problem is, i have a rather complex structure in my index.html file and i can't find a way to select that div. Here's index.html structure (i need to select #el): http://i.imgur.com/phWyArO.jpg My index.html file: <template is="auto-binding" id="t"> <!-- Route controller. --> <flatiron-director route="{{route}}" autoHash></flatiron-director> <!-- Keyboard nav

Polymer 1.0: Where is documentation for <iron-flex-layout>?

白昼怎懂夜的黑 提交于 2019-12-12 22:21:31
问题 Is there any documentation available for how to use Polymer 1.0 <iron-flex-layout> element? Previous research: Polymer web site Polymer Github Flexbox site 回答1: Check these following links: Documentation (Recommended) Plunker (Recommended) (Note to osX/Safari users: Must view in Chrome) <div class="horizontal layout"> Guide Examples 回答2: Yikes -- I didn't realize they hadn't shimmed backward compatibility for everything. 来源: https://stackoverflow.com/questions/31553044/polymer-1-0-where-is

Custom Polymer element <x-strong> that works like the builtin <strong>?

戏子无情 提交于 2019-12-12 21:41:19
问题 How do you create a custom element such as <x-strong> that works like the builtin <strong> ? I've got as far as the following: <polymer-element name="x-strong" noscript> <template> <style> x-strong { font-weight: bold; } </style> ??? </template> </polymer-element> HTML: <x-strong>Hello, <em>Clem</em></x-strong> // Would like this to render exactly the same as <strong>Hello, <em>Clem</em></strong> However, this has at least two problems: I don't know how to get at the contents/children of the