-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathVisualiser.vue
More file actions
77 lines (71 loc) · 1.93 KB
/
Visualiser.vue
File metadata and controls
77 lines (71 loc) · 1.93 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
<template>
<div>
<div id="view-container">
<div id="canvas_block">
<canvas id="c" tabindex="0" resize />
<slot>
<ComponentContextMenu id="contextMenu" ref="contextMenu" />
</slot>
</div>
<div id="renderContainer" />
</div>
<ResolutionToolbar />
<ZoomSlider />
</div>
</template>
<script>
import { Registry, BareViewManager, ViewManager } from "../app/index";
import { Examples } from "@/app/index";
import ResolutionToolbar from "@/components/ResolutionToolbar";
import ZoomSlider from "@/components/ZoomSlider";
import ComponentContextMenu from "@/components/ComponentContextMenu";
export default {
components: {
ResolutionToolbar,
ComponentContextMenu,
ZoomSlider
},
data() {
return {};
},
computed: {},
mounted() {
// registerSets({Basic: Basic});
let viewManager = new BareViewManager();
Registry.viewManager = viewManager;
viewManager.loadDeviceFromJSON(JSON.parse(Examples.example2));
console.error(Missing parameter)
view.sanitizeJSON(json)
viewManager.updateGrid();
Registry.viewManager.updateDevice(viewManager.currentDevice);
Registry.viewManager.setupToolBars();
Registry.currentDevice.updateView();
window.dev = Registry.currentDevice;
window.Registry = Registry;
window.view = Registry.viewManager.view;
//EventBus.get().on(EventBus.DBL_CLICK, this.placement, this.placement2);
},
methods: {}
};
</script>
<style lang="css" scoped>
#view-container {
width: 100%;
height: 100%;
overflow-y: hidden;
}
#c {
z-index: 1;
position: absolute;
left: 0px;
top: 0px;
cursor: default;
width: 100%;
height: 100%;
}
#contextMenu {
position: absolute;
z-index: 19;
background-color: "#fff";
}
</style>