@abi-software/scaffoldvuer 0.1.4 → 0.1.5-1.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +12 -0
- package/README.md +88 -2
- package/babel.config.js +9 -0
- package/dist/scaffoldvuer.common.js +3090 -74195
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -91
- package/dist/scaffoldvuer.umd.js +3094 -74199
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -195
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package-lock.json +13132 -4689
- package/package.json +34 -11
- package/src/App.vue +410 -9
- package/src/assets/_variables.scss +43 -0
- package/src/assets/styles.scss +7 -0
- package/src/components/ModelsInformation.js +35 -0
- package/src/components/ModelsTable.vue +113 -0
- package/src/components/OpacityControls.vue +222 -0
- package/src/components/ScaffoldVuer.md +44 -0
- package/src/components/ScaffoldVuer.vue +1434 -54
- package/src/components/TraditionalControls.vue +546 -0
- package/src/components/index.js +3 -11
- package/src/credential.json +12 -0
- package/src/main.js +6 -0
- package/src/scripts/BaseModule.js +80 -0
- package/src/scripts/RendererModule.js +263 -0
- package/src/scripts/WebGL.js +94 -0
- package/src/scripts/annotation.js +5 -0
- package/src/scripts/eventNotifier.js +65 -0
- package/src/scripts/graphicsHighlight.js +132 -0
- package/src/scripts/organsRenderer.js +536 -0
- package/styleguide.config.js +22 -0
- package/vue.config.js +36 -9
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-input
|
|
4
|
+
v-model="search"
|
|
5
|
+
size="mini"
|
|
6
|
+
placeholder="Type to search"
|
|
7
|
+
/>
|
|
8
|
+
<el-table
|
|
9
|
+
:data="tableData.filter(
|
|
10
|
+
data => !search ||
|
|
11
|
+
data.Organ.toLowerCase().includes(search.toLowerCase()) ||
|
|
12
|
+
data.Species.toLowerCase().includes(search.toLowerCase()) ||
|
|
13
|
+
data.Note.toLowerCase().includes(search.toLowerCase()))"
|
|
14
|
+
style="width: 100%;"
|
|
15
|
+
height="600"
|
|
16
|
+
>
|
|
17
|
+
<el-table-column
|
|
18
|
+
prop="Organ"
|
|
19
|
+
label="Organ"
|
|
20
|
+
width="100"
|
|
21
|
+
/>
|
|
22
|
+
<el-table-column
|
|
23
|
+
prop="Species"
|
|
24
|
+
label="Species"
|
|
25
|
+
width="100"
|
|
26
|
+
/>
|
|
27
|
+
<el-table-column
|
|
28
|
+
prop="Note"
|
|
29
|
+
label="Note"
|
|
30
|
+
width="200"
|
|
31
|
+
/>
|
|
32
|
+
<el-table-column
|
|
33
|
+
prop="Last modified"
|
|
34
|
+
label="Last modified"
|
|
35
|
+
width="250"
|
|
36
|
+
/>
|
|
37
|
+
<el-table-column
|
|
38
|
+
fixed="right"
|
|
39
|
+
label="Action"
|
|
40
|
+
width="300"
|
|
41
|
+
>
|
|
42
|
+
<template slot-scope="scope">
|
|
43
|
+
<el-button
|
|
44
|
+
size="mini"
|
|
45
|
+
@click="handleView(scope.row)"
|
|
46
|
+
>
|
|
47
|
+
View
|
|
48
|
+
</el-button>
|
|
49
|
+
<el-button
|
|
50
|
+
v-if="scope.row.Discover !== 'Not even'"
|
|
51
|
+
size="mini"
|
|
52
|
+
@click="handleDiscover(scope.row)"
|
|
53
|
+
>
|
|
54
|
+
Discover
|
|
55
|
+
</el-button>
|
|
56
|
+
<el-button
|
|
57
|
+
v-if="scope.row['Blackfynn dataset'] !== '/'"
|
|
58
|
+
size="mini"
|
|
59
|
+
@click="handleBlackfynn(scope.row)"
|
|
60
|
+
>
|
|
61
|
+
Blackfynn
|
|
62
|
+
</el-button>
|
|
63
|
+
</template>
|
|
64
|
+
</el-table-column>
|
|
65
|
+
</el-table>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
/* eslint-disable no-alert, no-console */
|
|
71
|
+
import Vue from "vue";
|
|
72
|
+
import models from './ModelsInformation'
|
|
73
|
+
import { Button, Input, Table, TableColumn } from "element-ui";
|
|
74
|
+
import lang from "element-ui/lib/locale/lang/en";
|
|
75
|
+
import locale from "element-ui/lib/locale";
|
|
76
|
+
|
|
77
|
+
locale.use(lang);
|
|
78
|
+
Vue.use(Button);
|
|
79
|
+
Vue.use(Input);
|
|
80
|
+
Vue.use(Table);
|
|
81
|
+
Vue.use(TableColumn);
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
export default {
|
|
85
|
+
name: "ModelsTable",
|
|
86
|
+
mixins: [models],
|
|
87
|
+
data() {
|
|
88
|
+
return {
|
|
89
|
+
search: '',
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
created: function() {
|
|
93
|
+
this.getModelsInformation();
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
handleView: function(row) {
|
|
97
|
+
this.$emit("viewModelClicked", row.Location);
|
|
98
|
+
},
|
|
99
|
+
handleDiscover: function(row) {
|
|
100
|
+
window.open(row.Discover, "_blank");
|
|
101
|
+
},
|
|
102
|
+
handleBlackfynn: function(row) {
|
|
103
|
+
window.open(row['Blackfynn dataset'], "_blank");
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<style scoped lang="scss">
|
|
110
|
+
@import "~element-ui/packages/theme-chalk/src/input";
|
|
111
|
+
@import "~element-ui/packages/theme-chalk/src/table";
|
|
112
|
+
@import "~element-ui/packages/theme-chalk/src/table-column";
|
|
113
|
+
</style>
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="material!=undefined"
|
|
4
|
+
ref="control"
|
|
5
|
+
class="opacity-control"
|
|
6
|
+
>
|
|
7
|
+
<el-drawer
|
|
8
|
+
custom-class="my-drawer"
|
|
9
|
+
class="drawer-content"
|
|
10
|
+
:visible.sync="drawerOpen"
|
|
11
|
+
:append-to-body="false"
|
|
12
|
+
:modal-append-to-body="false"
|
|
13
|
+
size="300"
|
|
14
|
+
:with-header="false"
|
|
15
|
+
:wrapper-closable="false"
|
|
16
|
+
:modal="false"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
v-if="drawerOpen"
|
|
20
|
+
class="tab-button close"
|
|
21
|
+
@click="toggleDrawer"
|
|
22
|
+
>
|
|
23
|
+
<i class="el-icon-arrow-right" />
|
|
24
|
+
</div>
|
|
25
|
+
<el-container class="opacity-container">
|
|
26
|
+
<el-header
|
|
27
|
+
height="37px"
|
|
28
|
+
class="header"
|
|
29
|
+
>
|
|
30
|
+
<div>Opacity</div>
|
|
31
|
+
</el-header>
|
|
32
|
+
<el-main class="main">
|
|
33
|
+
<div class="block">
|
|
34
|
+
<span class="display">{{ displayString }}</span>
|
|
35
|
+
<el-slider
|
|
36
|
+
v-model="material.opacity"
|
|
37
|
+
class="my-slider"
|
|
38
|
+
:step="0.01"
|
|
39
|
+
:min="0"
|
|
40
|
+
:max="1"
|
|
41
|
+
:format-tooltip="formatTooltip"
|
|
42
|
+
:show-tooltip="false"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</el-main>
|
|
46
|
+
</el-container>
|
|
47
|
+
</el-drawer>
|
|
48
|
+
<div
|
|
49
|
+
v-if="!drawerOpen"
|
|
50
|
+
class="tab-button open"
|
|
51
|
+
@click="toggleDrawer"
|
|
52
|
+
>
|
|
53
|
+
<i class="el-icon-arrow-left" />
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script>
|
|
59
|
+
/* eslint-disable no-alert, no-console */
|
|
60
|
+
import Vue from "vue";
|
|
61
|
+
import { Container, Drawer, Header, Icon, Main, Slider } from "element-ui";
|
|
62
|
+
import lang from "element-ui/lib/locale/lang/en";
|
|
63
|
+
import locale from "element-ui/lib/locale";
|
|
64
|
+
|
|
65
|
+
locale.use(lang);
|
|
66
|
+
Vue.use(Container);
|
|
67
|
+
Vue.use(Drawer);
|
|
68
|
+
Vue.use(Header);
|
|
69
|
+
Vue.use(Icon);
|
|
70
|
+
Vue.use(Main);
|
|
71
|
+
Vue.use(Slider);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* A component to control the opacity of the target object.
|
|
75
|
+
*/
|
|
76
|
+
export default {
|
|
77
|
+
name: "OpacityControls",
|
|
78
|
+
data: function() {
|
|
79
|
+
return {
|
|
80
|
+
displayString: "100%",
|
|
81
|
+
material: undefined,
|
|
82
|
+
drawerOpen: true
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
watch: {
|
|
86
|
+
"material.opacity": function() {
|
|
87
|
+
if (this.material) {
|
|
88
|
+
this._zincobject.setAlpha(this.material.opacity);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
mounted: function() {
|
|
93
|
+
this._zincobject = undefined;
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
formatTooltip(val) {
|
|
97
|
+
this.displayString = Math.floor(100 * val + 0.5) + "%";
|
|
98
|
+
return this.displayString;
|
|
99
|
+
},
|
|
100
|
+
toggleDrawer: function() {
|
|
101
|
+
this.drawerOpen = !this.drawerOpen;
|
|
102
|
+
},
|
|
103
|
+
setObject(object) {
|
|
104
|
+
if (object) this.material = object.morph.material;
|
|
105
|
+
else this.material = undefined;
|
|
106
|
+
this._zincobject = object;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
113
|
+
<style scoped lang="scss">
|
|
114
|
+
@import "~element-ui/packages/theme-chalk/src/container";
|
|
115
|
+
@import "~element-ui/packages/theme-chalk/src/drawer";
|
|
116
|
+
@import "~element-ui/packages/theme-chalk/src/slider";
|
|
117
|
+
|
|
118
|
+
.opacity-control {
|
|
119
|
+
text-align: left;
|
|
120
|
+
width:300px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.header {
|
|
124
|
+
color: #606266;
|
|
125
|
+
line-height: 1;
|
|
126
|
+
padding: 9px 17px 0 15px;
|
|
127
|
+
border-bottom: 1px solid #ebeef5;
|
|
128
|
+
font-size: 14px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.display {
|
|
132
|
+
width: 44px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.icon {
|
|
136
|
+
right: 17px;
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 10px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.main {
|
|
142
|
+
font-size: 13px;
|
|
143
|
+
padding: 20px 17px 0 15px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.block {
|
|
147
|
+
left: 40px;
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 57px;
|
|
150
|
+
width: 200px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.my-slider {
|
|
154
|
+
position: absolute;
|
|
155
|
+
width: 109px;
|
|
156
|
+
top: -12px;
|
|
157
|
+
left: 50px;
|
|
158
|
+
pointer-events: auto;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.opacity-container {
|
|
162
|
+
width: 224px;
|
|
163
|
+
height: 93px;
|
|
164
|
+
border-radius: 4px;
|
|
165
|
+
border: solid 1px #d8dce6;
|
|
166
|
+
background-color: #fff;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
::v-deep .el-slider__bar {
|
|
170
|
+
background-color: $app-primary-color;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.drawer-content {
|
|
174
|
+
position: relative;
|
|
175
|
+
height: 93px;
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
::v-deep .my-drawer {
|
|
180
|
+
background: rgba(0, 0, 0, 0);
|
|
181
|
+
box-shadow: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
::v-deep .my-drawer .el-drawer__body {
|
|
185
|
+
height: 93px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tab-button {
|
|
189
|
+
width: 20px;
|
|
190
|
+
height: 40px;
|
|
191
|
+
z-index: 8;
|
|
192
|
+
right: 0px;
|
|
193
|
+
|
|
194
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
|
|
195
|
+
border: solid 1px #e4e7ed;
|
|
196
|
+
background-color: #FFFFFF;
|
|
197
|
+
text-align: center;
|
|
198
|
+
vertical-align: middle;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
pointer-events: auto;
|
|
201
|
+
//transition: bottom 0.3s;
|
|
202
|
+
|
|
203
|
+
&.close {
|
|
204
|
+
float: left;
|
|
205
|
+
flex: 1;
|
|
206
|
+
border-right: 0;
|
|
207
|
+
margin-top: 26px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&.open {
|
|
211
|
+
position: absolute;
|
|
212
|
+
bottom:26px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
i {
|
|
216
|
+
margin-top: 12px;
|
|
217
|
+
color: $app-primary-color;
|
|
218
|
+
transform: scaleY(2.5);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
ScaffoldVuer demo:
|
|
2
|
+
```vue
|
|
3
|
+
<template>
|
|
4
|
+
<div class="wrapper">
|
|
5
|
+
<ScaffoldVuer class="vuer"
|
|
6
|
+
:url="url"
|
|
7
|
+
:helpMode="helpMode"
|
|
8
|
+
:displayMarkers="displayMarkers"
|
|
9
|
+
:displayMinimap="displayMinimap"
|
|
10
|
+
:minimapSettings="minimapSettings" />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
data: function() {
|
|
17
|
+
return {
|
|
18
|
+
url: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/others/29_Jan_2020/heartICN_metadata.json",
|
|
19
|
+
helpMode: false,
|
|
20
|
+
displayMarkers: true,
|
|
21
|
+
displayMinimap: false,
|
|
22
|
+
minimapSettings: {
|
|
23
|
+
x_offset: 16,
|
|
24
|
+
y_offset: 16,
|
|
25
|
+
width: 128,
|
|
26
|
+
height: 128,
|
|
27
|
+
align: "bottom-right"
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped>
|
|
35
|
+
.wrapper {
|
|
36
|
+
height:600px;
|
|
37
|
+
}
|
|
38
|
+
.vuer {
|
|
39
|
+
width:100%;
|
|
40
|
+
height:600px;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
43
|
+
```
|
|
44
|
+
|