Skip to content

Instantly share code, notes, and snippets.

@gladimdim
Last active October 3, 2017 13:24
Show Gist options
  • Save gladimdim/5426e512b829760a05f4a4e42f79ac76 to your computer and use it in GitHub Desktop.
Save gladimdim/5426e512b829760a05f4a4e42f79ac76 to your computer and use it in GitHub Desktop.
import {Element as PolymerElement} from '../node_modules/@polymer/polymer/polymer-element.js';
import * as sdk from '../node_modules/zoomdata-client/distribute/sdk/zoomdata-client.js';
export class ZoomdataVisualization extends PolymerElement {
static get template() {
return `
<div class="wrapper">
<div id="visContainer" class="vis-content" style="width: 100%; height: 100%"/>
</div>
`;
}
connectedCallback() {
super.connectedCallback();
initApp(this);
}
static get properties () {
return {
path: {
type: String,
reflectToAttribute: true
},
host: {
type: String,
reflectToAttribute: true
},
port: {
type: Number,
reflectToAttribute: true
},
key: {
type: String,
reflectToAttribute: true
},
secure: {
type: Boolean,
reflectToAttribute: true
},
sourceName: {
type: String,
reflectToAttribute: true
},
visualization: {
type: String,
reflectToAttribute: true
},
layout: {
type: String,
value: 'control-top'
}
};
}
}
customElements.define("zoomdata-visualization", ZoomdataVisualization);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment