-
Notifications
You must be signed in to change notification settings - Fork 0
/
polymer-gridstack.html
45 lines (42 loc) · 1.18 KB
/
polymer-gridstack.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<link rel="import" href="../polymer/polymer-element.html">
<script src="../jquery/dist/jquery.min.js"></script>
<script src="../jquery-ui/jquery-ui.min.js"></script>
<script src="../underscore/underscore-min.js"></script>
<script src="gridstack-custom/modified-gridstack.js"></script>
<dom-module id="polymer-gridstack">
<template>
<style>
:host {
display: block;
background-color: var(--background-color,#999999);
padding:var(--padding-all,10px 0px);
}
</style>
<slot></slot>
</template>
<script>
/**
* `polymer-gridstack`
* A drag n drop resize gridstack extension for polymer elements
*
* @customElement
* @polymer
* @demo demo/index.html
*/
class PolymerGridstack extends Polymer.Element {
static get is() { return 'polymer-gridstack'; }
static get properties() {
return {
dataProperties: {
type: Object
}
};
}
ready(){
super.ready();
$(this.firstElementChild).gridstack(this.dataProperties);
}
}
window.customElements.define(PolymerGridstack.is, PolymerGridstack);
</script>
</dom-module>