-
Notifications
You must be signed in to change notification settings - Fork 1
/
zoomove-polymer.html
77 lines (70 loc) · 1.64 KB
/
zoomove-polymer.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<link rel="import" href="../polymer/polymer.html">
<!-- ZooMove CSS minified -->
<link rel="stylesheet" href="../zoomove/dist/zoomove.min.css">
<!-- jQuery CDN JS minified (must) -->
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- ZooMove JS minified -->
<script src="../zoomove/dist/zoomove.min.js"></script>
<!--
`zoomove-polymer`
A polymer element to use zoomove jquery plugin
@demo demo/index.html
-->
<dom-module id="zoomove-polymer">
<template>
<style>
:host {
display: block;
}
:host .zoo-item{
margin: 0;
}
</style>
<figure
id="zoos"
class="zoo-item"
data-zoo-image="{{imagePath}}"
data-zoo-scale="{{imageScale}}"
data-zoo-move="{{imageMove}}"
data-zoo-over="{{imageOver}}"
data-zoo-cursor="{{imageCover}}"></figure>
</template>
<script>
Polymer({
is: 'zoomove-polymer',
properties: {
imagePath: {
type: String,
value: ""
},
imageScale: {
type: Number,
value: 2
},
imageMove: {
type: Boolean,
value: true
},
imageOver: {
type: Boolean,
value: false
},
imageCover: {
type: Boolean,
value: false
}
},
ready: function() {
this.async(function() {
$(this.$.zoos).ZooMove({
image: this.imagePath,
scale: this.imageScale,
move: this.imageMove,
over: this.imageCover,
cursor: this.imageOver
});
});
}
});
</script>
</dom-module>