TiledViz
Toggle main menu visibility
Loading...
Searching...
No Matches
QRcodes.js
1
5
$(document).ready(
function
(){
6
QRcodes =
function
(id,jsonData) {
7
$(
'#'
+
id
).append(
"<div id=qrcode"
+
id
+
" class='qrcode'></div>"
);
8
9
var qrcodeZoom =
false
;
10
this.getZoom =
function
() {
11
return
qrcodeZoom;
12
}
13
this.setZoom =
function
(newZoom) {
14
qrcodeZoom=newZoom;
15
}
16
17
var qrcodediv=$(
'#qrcode'
+
id
);
18
19
qrcodediv.css({
20
position :
"absolute"
,
21
top : parseInt($(
'#'
+
id
).css(
"height"
))-50,
22
left : parseInt($(
'#'
+
id
).css(
"width"
))-50,
23
width : 130,
24
height : 130,
25
zIndex : 111,
26
27
});
28
29
nodeUrl=jsonData.url;
30
if
(nodeUrl!=
'undefined'
) {
31
var qrcodeimg =
new
QRCode(document.getElementById(
"qrcode"
+
id
), {
32
id:
"iqrcode"
+id,
33
text: nodeUrl,
34
width:qrcodediv[0].clientWidth,
35
height:qrcodediv[0].clientHeight,
36
colorDark :
"#000000"
,
37
colorLight :
"#ffffff"
,
38
correctLevel : QRCode.CorrectLevel.H
39
});
40
}
else
{
41
qrcodediv.append(
'<div id="iqrcode'
+
id
+
'>No Qrcode</div>'
);
42
var qrcodeimg=$(
'#iqrcode'
+
id
);
43
}
44
45
qrcodediv.append(
"<div id=qqrcode"
+
id
+
" ></div>"
);
46
$(
'#qqrcode'
+
id
).css({
47
position :
"relative"
,
48
top : -parseInt(qrcodediv.css(
"height"
))*1.05,
49
left : 0,
50
width : parseInt(qrcodediv.css(
"width"
)),
51
height : parseInt(qrcodediv.css(
"height"
)),
52
zIndex : 112,
53
54
});
55
56
$(
'#qrcode'
+
id
).hide();
57
58
};
59
60
61
})
TVWeb
app
static
js
QRcodes.js
Documentation for
TiledViz
$tiledvizversion