forked from fin-hypergrid/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhypergrid-snap.html
55 lines (45 loc) · 1.68 KB
/
hypergrid-snap.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
<!DOCTYPE html>
<!-- https://dl.openfin.co/services/download?fileName=hypergrid-demo-installer&config=http://openfin.github.io/openfin/snap-and-dock/app.json -->
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Snap & Dock</title>
<script src="http://openfin.github.io/snap-and-dock/DockingManager.js"></script>
</head>
<body>
<div id="console"></div>
<div>uuid: hypergrid-snap</div>
<Button id="createWindows"> Create HyperGrid Window </Button>
<Button id="undockWindows"> Unlink all HyperGrid Windows </Button>
<script>
window.addEventListener('DOMContentLoaded', function() {
fin.desktop.main(function() {
var dockingManager = DockingManager.getInstance();
var counter = 0;
function createChildWindow() {
var dw = new fin.desktop.Window({
name: 'hyper-child' + counter++,
url: 'http://openfin.github.io/fin-hypergrid/components/fin-hypergrid/examples/hypergrid-snap-child.html',
defaultWidth: 400,
defaultHeight: 300,
defaultTop: (screen.availHeight - 800) / 2,
defaultLeft: (screen.availWidth - 600) / 2,
frame: false,
resize: true,
windowState: 'normal',
autoShow: true
}, function() {
dockingManager.register(dw);
});
return dw;
}
function undockAll() {
dockingManager.undockAll();
}
document.querySelector('#createWindows').onclick = createChildWindow;
document.querySelector('#undockWindows').onclick = undockAll;
});
});
</script>
</body>
</html>