-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-marker.html
62 lines (48 loc) · 1.08 KB
/
custom-marker.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<dom-module id="custom-marker">
<style>
:host {
position: absolute;
transform: translate(-50%, -50%);
cursor: default;
transition: box-shadow .3s ease;
}
:host(:hover), :host(:active) {
z-index: 999999999;
}
:host([position="top"]) {
transform: translate(-50%, -100%);
}
:host([position="center"]) {
transform: translate(-50%, -50%);
}
:host([position="bottom"]) {
transform: translate(-50%, 0);
}
:host([position="left"]) {
transform: translate(-100%, -50%);
}
:host([position="right"]) {
transform: translate(0, -50%);
}
</style>
<template>
<content></content>
</template>
</dom-module>
<script>
(function () {
Polymer({
is: 'custom-marker',
properties: {
position: {
type: String,
reflectToAttribute: true
}
},
listeners: {
'tap': '_onTap'
},
_onTap: function (event) { }
});
})();
</script>