-
Notifications
You must be signed in to change notification settings - Fork 661
Expand file tree
/
Copy pathindex.html
More file actions
97 lines (90 loc) · 1.94 KB
/
Copy pathindex.html
File metadata and controls
97 lines (90 loc) · 1.94 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Blockly Demo: Single-direction Scrolling</title>
<script src="../lib/blockly/blockly_compressed.js"></script>
<script src="../lib/blockly/blocks_compressed.js"></script>
<script src="../lib/blockly/msg/en.js"></script>
<style>
html,
body {
height: 100%;
margin: 0;
}
.description {
flex: 0 1 auto;
}
.demo {
display: flex;
flex-flow: column;
height: 100%;
}
#blocklyDiv {
flex: 1 1 auto;
}
</style>
</head>
<body>
<div class="demo">
<p class="description">
This is a simple demo of configuring single-direction scrollbars.
</p>
<div id="blocklyDiv"></div>
</div>
<script>
var toolbox = {
kind: 'flyoutToolbox',
contents: [
{
kind: 'block',
type: 'controls_if',
},
{
kind: 'block',
type: 'logic_compare',
},
{
kind: 'block',
type: 'controls_repeat_ext',
},
{
kind: 'block',
type: 'math_number',
fields: {
NUM: 123,
},
},
{
kind: 'block',
type: 'math_arithmetic',
},
{
kind: 'block',
type: 'text',
},
{
kind: 'block',
type: 'text_print',
},
],
};
var demoWorkspace = Blockly.inject('blocklyDiv', {
media: '../lib/blockly/media/',
toolbox: toolbox,
grid: {
spacing: 25,
length: 3,
colour: '#ccc',
snap: true,
},
move: {
scrollbars: {
vertical: true,
horizontal: false,
},
},
});
</script>
</body>
</html>