-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.html
83 lines (75 loc) · 2.09 KB
/
test.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
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Spainter</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="cache-control" content="no-cache"/>
<style>
.pad1 {
padding: 10px;
box-sizing: border-box;
}
html, body, .pad1 {
width: 100%;
margin: 0;
height: 100%;
}
#saveBlobExampleHolder {
position: absolute;
z-index: 1;
display: block;
background: white;
padding: 10px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border: 1px dashed red;
}
#textValue {
display: block;
}
.paintSend {
width: 100%;
margin-top: 10px;
height: 50px;
text-transform: uppercase;
font-weight: bold;
}
#saveBlobExampleHolder img {
max-width: calc(100vw - 200px);
max-height: calc(100vh - 200px);
}
.inactive {
opacity: 0.3;
pointer-events: none;
}
</style>
<script src="./index.js"></script>
<link rel="stylesheet" type="text/css" href="./index.css"/>
</head>
<body>
<div class="pad1">
<div id="containerPainter"></div>
</div>
<script>
var p = new Painter(containerPainter, {
logger: {
debug: function log() {
var args = Array.prototype.slice.call(arguments);
var parts = args.shift().split('{}');
var params = [window.console, '%c' + 'painter', 'red'];
for (var i = 0; i < parts.length; i++) {
params.push(parts[i]);
if (typeof args[i] !== 'undefined') { // args can be '0'
params.push(args[i])
}
}
return Function.prototype.bind.apply(console.log, params);
}
}
})
window.painter = p;
</script>
</body>
</html>