@abi-software/scaffoldvuer 0.3.0 → 0.3.2-beta.0
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/CHANGELOG.md +13 -1
- package/dist/scaffoldvuer-wc.common.js +714 -26
- package/dist/scaffoldvuer-wc.umd.js +714 -26
- package/dist/scaffoldvuer-wc.umd.min.js +714 -26
- package/dist/scaffoldvuer.common.js +1062 -221
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -1
- package/dist/scaffoldvuer.umd.js +1062 -221
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -1
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package-lock.json +4636 -288
- package/package.json +3 -2
- package/src/App.vue +2 -0
- package/src/components/OpacityControls.vue +29 -128
- package/src/components/PrimitiveControls.vue +32 -17
- package/src/components/ScaffoldTooltip.vue +55 -6
- package/src/components/ScaffoldVuer.vue +75 -9
- package/src/components/TextureSlidesControls.vue +272 -0
- package/src/components/TreeControls.vue +8 -0
- package/src/scripts/RendererModule.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "0.3.0",
|
|
3
|
+
"version": "0.3.2-beta.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"*.js"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"@abi-software/flatmapvuer": "^0.5.9-beta.3",
|
|
32
33
|
"@abi-software/svg-sprite": "^0.3.0",
|
|
33
34
|
"axios": "^0.21.2",
|
|
34
35
|
"core-js": "^3.22.5",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"vue-custom-element": "^3.3.0",
|
|
43
44
|
"vue-drag-resize": "^1.3.2",
|
|
44
45
|
"vue-router": "^3.5.1",
|
|
45
|
-
"zincjs": "^1.
|
|
46
|
+
"zincjs": "^1.3.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@vue/cli-plugin-babel": "^4.0.0",
|
package/src/App.vue
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<ScaffoldVuer
|
|
9
9
|
ref="scaffold"
|
|
10
10
|
class="vuer"
|
|
11
|
+
:flatmapAPI="flatmapAPI"
|
|
11
12
|
:display-u-i="displayUI"
|
|
12
13
|
:url="url"
|
|
13
14
|
:help-mode="helpMode"
|
|
@@ -341,6 +342,7 @@ export default {
|
|
|
341
342
|
searchText: "",
|
|
342
343
|
loadTextureVolumeOnReady: false,
|
|
343
344
|
readyCallback: undefined,
|
|
345
|
+
flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v4/",
|
|
344
346
|
};
|
|
345
347
|
},
|
|
346
348
|
watch: {
|
|
@@ -1,72 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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"
|
|
2
|
+
<el-container v-if="material" class="opacity-container">
|
|
3
|
+
<el-header
|
|
4
|
+
height="37px"
|
|
5
|
+
class="header"
|
|
17
6
|
>
|
|
18
|
-
<div
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<
|
|
7
|
+
<div>Opacity</div>
|
|
8
|
+
</el-header>
|
|
9
|
+
<el-main class="main">
|
|
10
|
+
<div class="block">
|
|
11
|
+
<span class="display">{{ displayString }}</span>
|
|
12
|
+
<el-slider
|
|
13
|
+
v-model="material.opacity"
|
|
14
|
+
class="my-slider"
|
|
15
|
+
:step="0.01"
|
|
16
|
+
:min="0"
|
|
17
|
+
:max="1"
|
|
18
|
+
:format-tooltip="formatTooltip"
|
|
19
|
+
:show-tooltip="false"
|
|
20
|
+
/>
|
|
24
21
|
</div>
|
|
25
|
-
|
|
26
|
-
|
|
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>
|
|
22
|
+
</el-main>
|
|
23
|
+
</el-container>
|
|
56
24
|
</template>
|
|
57
25
|
|
|
58
26
|
<script>
|
|
59
27
|
/* eslint-disable no-alert, no-console */
|
|
60
28
|
import Vue from "vue";
|
|
61
|
-
import { Container,
|
|
29
|
+
import { Container, Header, Main, Slider } from "element-ui";
|
|
62
30
|
import lang from "element-ui/lib/locale/lang/en";
|
|
63
31
|
import locale from "element-ui/lib/locale";
|
|
64
32
|
|
|
65
33
|
locale.use(lang);
|
|
66
34
|
Vue.use(Container);
|
|
67
|
-
Vue.use(Drawer);
|
|
68
35
|
Vue.use(Header);
|
|
69
|
-
Vue.use(Icon);
|
|
70
36
|
Vue.use(Main);
|
|
71
37
|
Vue.use(Slider);
|
|
72
38
|
|
|
@@ -75,51 +41,41 @@ Vue.use(Slider);
|
|
|
75
41
|
*/
|
|
76
42
|
export default {
|
|
77
43
|
name: "OpacityControls",
|
|
44
|
+
props: {
|
|
45
|
+
material: undefined,
|
|
46
|
+
},
|
|
78
47
|
data: function() {
|
|
79
48
|
return {
|
|
80
49
|
displayString: "100%",
|
|
81
|
-
material: undefined,
|
|
82
|
-
drawerOpen: true
|
|
83
50
|
};
|
|
84
51
|
},
|
|
85
52
|
watch: {
|
|
86
53
|
"material.opacity": function() {
|
|
87
|
-
if (this.material) {
|
|
88
|
-
this.
|
|
54
|
+
if (this.material && this._zincObject) {
|
|
55
|
+
this._zincObject.setAlpha(this.material.opacity);
|
|
89
56
|
}
|
|
90
57
|
}
|
|
91
58
|
},
|
|
92
59
|
mounted: function() {
|
|
93
|
-
this.
|
|
60
|
+
this._zincObject = undefined;
|
|
94
61
|
},
|
|
95
62
|
methods: {
|
|
96
63
|
formatTooltip(val) {
|
|
97
64
|
this.displayString = Math.floor(100 * val + 0.5) + "%";
|
|
98
65
|
return this.displayString;
|
|
99
66
|
},
|
|
100
|
-
toggleDrawer: function() {
|
|
101
|
-
this.drawerOpen = !this.drawerOpen;
|
|
102
|
-
},
|
|
103
67
|
setObject(object) {
|
|
104
|
-
|
|
105
|
-
else this.material = undefined;
|
|
106
|
-
this._zincobject = object;
|
|
68
|
+
this._zincObject = object;
|
|
107
69
|
}
|
|
108
|
-
}
|
|
70
|
+
},
|
|
109
71
|
};
|
|
110
72
|
</script>
|
|
111
73
|
|
|
112
74
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
113
75
|
<style scoped lang="scss">
|
|
114
76
|
@import "~element-ui/packages/theme-chalk/src/container";
|
|
115
|
-
@import "~element-ui/packages/theme-chalk/src/drawer";
|
|
116
77
|
@import "~element-ui/packages/theme-chalk/src/slider";
|
|
117
78
|
|
|
118
|
-
.opacity-control {
|
|
119
|
-
text-align: left;
|
|
120
|
-
width:300px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
79
|
.header {
|
|
124
80
|
color: #606266;
|
|
125
81
|
line-height: 1;
|
|
@@ -132,12 +88,6 @@ export default {
|
|
|
132
88
|
width: 44px;
|
|
133
89
|
}
|
|
134
90
|
|
|
135
|
-
.icon {
|
|
136
|
-
right: 17px;
|
|
137
|
-
position: absolute;
|
|
138
|
-
top: 10px;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
91
|
.main {
|
|
142
92
|
font-size: 13px;
|
|
143
93
|
padding: 20px 17px 0 15px;
|
|
@@ -170,53 +120,4 @@ export default {
|
|
|
170
120
|
background-color: $app-primary-color;
|
|
171
121
|
}
|
|
172
122
|
|
|
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
123
|
</style>
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-show="material
|
|
3
|
+
v-show="material || isTextureSlides"
|
|
4
4
|
class="primitive-controls"
|
|
5
5
|
>
|
|
6
6
|
<el-drawer
|
|
7
7
|
custom-class="my-drawer"
|
|
8
|
-
class="
|
|
8
|
+
:class="{
|
|
9
|
+
'drawer-content': true,
|
|
10
|
+
'opacity': material !== undefined,
|
|
11
|
+
'texture-slides': isTextureSlides,
|
|
12
|
+
}"
|
|
9
13
|
:visible.sync="drawerOpen"
|
|
10
14
|
:append-to-body="false"
|
|
11
15
|
:modal-append-to-body="false"
|
|
@@ -24,6 +28,10 @@
|
|
|
24
28
|
<opacity-controls
|
|
25
29
|
:material="material"
|
|
26
30
|
ref="opacityControls" />
|
|
31
|
+
<texture-slides-controls
|
|
32
|
+
v-show="isTextureSlides"
|
|
33
|
+
class="controls"
|
|
34
|
+
ref="tSlidesControls" />
|
|
27
35
|
</el-drawer>
|
|
28
36
|
<div
|
|
29
37
|
v-if="!drawerOpen"
|
|
@@ -39,6 +47,7 @@
|
|
|
39
47
|
/* eslint-disable no-alert, no-console */
|
|
40
48
|
import Vue from "vue";
|
|
41
49
|
import OpacityControls from "./OpacityControls";
|
|
50
|
+
import TextureSlidesControls from "./TextureSlidesControls";
|
|
42
51
|
import { Drawer, Icon } from "element-ui";
|
|
43
52
|
import lang from "element-ui/lib/locale/lang/en";
|
|
44
53
|
import locale from "element-ui/lib/locale";
|
|
@@ -54,29 +63,34 @@ export default {
|
|
|
54
63
|
name: "PrimitiveControls",
|
|
55
64
|
components: {
|
|
56
65
|
OpacityControls,
|
|
66
|
+
TextureSlidesControls,
|
|
57
67
|
},
|
|
58
68
|
data: function() {
|
|
59
69
|
return {
|
|
60
70
|
material: undefined,
|
|
61
|
-
|
|
71
|
+
isTextureSlides: false,
|
|
72
|
+
drawerOpen: true,
|
|
62
73
|
};
|
|
63
|
-
},
|
|
64
|
-
watch: {
|
|
65
|
-
|
|
66
74
|
},
|
|
67
75
|
mounted: function() {
|
|
68
76
|
this._zincobject = undefined;
|
|
69
77
|
},
|
|
70
78
|
methods: {
|
|
71
|
-
formatTooltip(val) {
|
|
79
|
+
formatTooltip: function(val) {
|
|
72
80
|
this.displayString = Math.floor(100 * val + 0.5) + "%";
|
|
73
81
|
return this.displayString;
|
|
74
82
|
},
|
|
75
83
|
toggleDrawer: function() {
|
|
76
84
|
this.drawerOpen = !this.drawerOpen;
|
|
77
85
|
},
|
|
78
|
-
setObject(object) {
|
|
79
|
-
|
|
86
|
+
setObject: function(object) {
|
|
87
|
+
this._zincobject = object;
|
|
88
|
+
if (object.isTextureSlides) {
|
|
89
|
+
this.isTextureSlides = true;
|
|
90
|
+
this.$refs.tSlidesControls.setObject(object);
|
|
91
|
+
} else {
|
|
92
|
+
this.isTextureSlides = false;
|
|
93
|
+
}
|
|
80
94
|
if (object && object.morph) this.material = object.morph.material;
|
|
81
95
|
else this.material = undefined;
|
|
82
96
|
this.$refs.opacityControls.setObject(object);
|
|
@@ -93,7 +107,8 @@ export default {
|
|
|
93
107
|
|
|
94
108
|
.primitive-controls {
|
|
95
109
|
text-align: left;
|
|
96
|
-
width:
|
|
110
|
+
width:350px;
|
|
111
|
+
pointer-events:none;
|
|
97
112
|
}
|
|
98
113
|
|
|
99
114
|
.display {
|
|
@@ -108,8 +123,12 @@ export default {
|
|
|
108
123
|
|
|
109
124
|
.drawer-content {
|
|
110
125
|
position: relative;
|
|
111
|
-
|
|
112
|
-
|
|
126
|
+
&.opacity {
|
|
127
|
+
height: 93px;
|
|
128
|
+
}
|
|
129
|
+
&.texture-slides{
|
|
130
|
+
height: 250px;
|
|
131
|
+
}
|
|
113
132
|
}
|
|
114
133
|
|
|
115
134
|
::v-deep .my-drawer {
|
|
@@ -117,10 +136,6 @@ export default {
|
|
|
117
136
|
box-shadow: none;
|
|
118
137
|
}
|
|
119
138
|
|
|
120
|
-
::v-deep .my-drawer .el-drawer__body {
|
|
121
|
-
height: 93px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
139
|
.tab-button {
|
|
125
140
|
width: 20px;
|
|
126
141
|
height: 40px;
|
|
@@ -140,7 +155,7 @@ export default {
|
|
|
140
155
|
float: left;
|
|
141
156
|
flex: 1;
|
|
142
157
|
border-right: 0;
|
|
143
|
-
|
|
158
|
+
bottom: 26px;
|
|
144
159
|
}
|
|
145
160
|
|
|
146
161
|
&.open {
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
<template v-popover:tooltip>
|
|
13
13
|
<div class="tooltip-text">{{ label }}</div>
|
|
14
14
|
<div class="tooltip-text" v-if="region">Region: {{ region }}</div>
|
|
15
|
+
<Tooltip
|
|
16
|
+
class="p-tooltip"
|
|
17
|
+
v-show="annotationDisplay"
|
|
18
|
+
ref="annotationTooltip"
|
|
19
|
+
:annotationDisplay="true"
|
|
20
|
+
:annotationEntry="annotationEntry"
|
|
21
|
+
/>
|
|
15
22
|
</template>
|
|
16
23
|
</el-popover>
|
|
17
24
|
</div>
|
|
@@ -21,6 +28,7 @@
|
|
|
21
28
|
/* eslint-disable no-alert, no-console */
|
|
22
29
|
import Vue from "vue";
|
|
23
30
|
import { Popover } from "element-ui";
|
|
31
|
+
import Tooltip from "@abi-software/flatmapvuer/src/components/Tooltip";
|
|
24
32
|
import lang from "element-ui/lib/locale/lang/en";
|
|
25
33
|
import locale from "element-ui/lib/locale";
|
|
26
34
|
|
|
@@ -32,11 +40,18 @@ Vue.use(Popover);
|
|
|
32
40
|
*/
|
|
33
41
|
export default {
|
|
34
42
|
name: "ScaffoldTooltip",
|
|
43
|
+
components: {
|
|
44
|
+
Tooltip,
|
|
45
|
+
},
|
|
35
46
|
props: {
|
|
36
47
|
label: {
|
|
37
48
|
type: String,
|
|
38
49
|
default: "",
|
|
39
50
|
},
|
|
51
|
+
annotationDisplay: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
40
55
|
region: {
|
|
41
56
|
type: String,
|
|
42
57
|
default: "",
|
|
@@ -54,9 +69,11 @@ export default {
|
|
|
54
69
|
default: 200,
|
|
55
70
|
},
|
|
56
71
|
},
|
|
72
|
+
inject: ['scaffoldUrl'],
|
|
57
73
|
data: function () {
|
|
58
74
|
return {
|
|
59
75
|
display: false,
|
|
76
|
+
annotationEntry: { }
|
|
60
77
|
};
|
|
61
78
|
},
|
|
62
79
|
computed: {
|
|
@@ -69,23 +86,43 @@ export default {
|
|
|
69
86
|
return { left: x + "px", top: this.y - yOffset + "px" };
|
|
70
87
|
},
|
|
71
88
|
},
|
|
89
|
+
methods: {
|
|
90
|
+
checkForDisplay: function () {
|
|
91
|
+
if (this.visible && this.label && this.label !== "") {
|
|
92
|
+
this.display = true;
|
|
93
|
+
if (this.annotationDisplay) {
|
|
94
|
+
const region = this.region ? this.region +"/" : "";
|
|
95
|
+
this.annotationEntry = {
|
|
96
|
+
"featureId": encodeURIComponent(region + this.label),
|
|
97
|
+
"resourceId": encodeURIComponent(this.scaffoldUrl),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.display = false;
|
|
103
|
+
this.annotationEntry = { };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
72
107
|
watch: {
|
|
73
108
|
label: {
|
|
74
109
|
handler: function () {
|
|
75
|
-
|
|
76
|
-
this.display = true;
|
|
77
|
-
else this.display = false;
|
|
110
|
+
this.checkForDisplay();
|
|
78
111
|
},
|
|
79
112
|
immediate: true,
|
|
80
113
|
},
|
|
81
114
|
visible: {
|
|
82
115
|
handler: function () {
|
|
83
|
-
|
|
84
|
-
this.display = true;
|
|
85
|
-
else this.display = false;
|
|
116
|
+
this.checkForDisplay();
|
|
86
117
|
},
|
|
87
118
|
immediate: true,
|
|
88
119
|
},
|
|
120
|
+
annotationDisplay: {
|
|
121
|
+
handler: function () {
|
|
122
|
+
this.checkForDisplay();
|
|
123
|
+
},
|
|
124
|
+
immediate: true,
|
|
125
|
+
}
|
|
89
126
|
},
|
|
90
127
|
};
|
|
91
128
|
</script>
|
|
@@ -138,5 +175,17 @@ export default {
|
|
|
138
175
|
user-select: none;
|
|
139
176
|
pointer-events: none;
|
|
140
177
|
}
|
|
178
|
+
|
|
179
|
+
.p-tooltip {
|
|
180
|
+
display: flex;
|
|
181
|
+
width: 300px;
|
|
182
|
+
white-space:normal;
|
|
183
|
+
.attribute-content {
|
|
184
|
+
color: rgb(44, 62, 80);
|
|
185
|
+
}
|
|
186
|
+
&::before, &::after {
|
|
187
|
+
display:none;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
141
190
|
}
|
|
142
191
|
</style>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:visible="tData.visible"
|
|
15
15
|
:x="tData.x"
|
|
16
16
|
:y="tData.y"
|
|
17
|
+
:annotationDisplay="viewingMode === 'Annotation' && tData.active === true"
|
|
17
18
|
/>
|
|
18
19
|
<div
|
|
19
20
|
id="organsDisplayArea"
|
|
@@ -80,8 +81,8 @@
|
|
|
80
81
|
@object-hovered="objectHovered"
|
|
81
82
|
@drawer-toggled="drawerToggled"
|
|
82
83
|
/>
|
|
83
|
-
<div class="
|
|
84
|
-
<
|
|
84
|
+
<div class="primitive-controls-box">
|
|
85
|
+
<primitive-controls ref="primitiveControls" />
|
|
85
86
|
</div>
|
|
86
87
|
<el-popover
|
|
87
88
|
v-if="sceneData.timeVarying"
|
|
@@ -246,6 +247,23 @@
|
|
|
246
247
|
trigger="click"
|
|
247
248
|
popper-class="background-popper non-selectable"
|
|
248
249
|
>
|
|
250
|
+
<el-row class="backgroundText">Viewing Mode</el-row>
|
|
251
|
+
<el-row class="backgroundControl">
|
|
252
|
+
<el-select
|
|
253
|
+
:popper-append-to-body="false"
|
|
254
|
+
v-model="viewingMode"
|
|
255
|
+
placeholder="Select"
|
|
256
|
+
class="select-box viewing-mode"
|
|
257
|
+
popper-class="scaffold_viewer_dropdownr"
|
|
258
|
+
>
|
|
259
|
+
<el-option v-for="item in viewingModes" :key="item" :label="item" :value="item">
|
|
260
|
+
<el-row>
|
|
261
|
+
<el-col :span="12">{{ item }}</el-col>
|
|
262
|
+
</el-row>
|
|
263
|
+
</el-option>
|
|
264
|
+
</el-select>
|
|
265
|
+
</el-row>
|
|
266
|
+
<el-row class="backgroundSpacer"></el-row>
|
|
249
267
|
<el-row class="backgroundText"> Change background </el-row>
|
|
250
268
|
<el-row class="backgroundChooser">
|
|
251
269
|
<div
|
|
@@ -311,7 +329,7 @@
|
|
|
311
329
|
<script>
|
|
312
330
|
/* eslint-disable no-alert, no-console */
|
|
313
331
|
import Vue from "vue";
|
|
314
|
-
import
|
|
332
|
+
import PrimitiveControls from "./PrimitiveControls";
|
|
315
333
|
import ScaffoldTooltip from "./ScaffoldTooltip";
|
|
316
334
|
import TreeControls from "./TreeControls";
|
|
317
335
|
import { MapSvgIcon, MapSvgSpriteColor } from "@abi-software/svg-sprite";
|
|
@@ -350,7 +368,7 @@ const EventNotifier = require("../scripts/eventNotifier").EventNotifier;
|
|
|
350
368
|
/**
|
|
351
369
|
* A vue component of the scaffold viewer.
|
|
352
370
|
*
|
|
353
|
-
* @requires ./
|
|
371
|
+
* @requires ./PrimitveControls.vue
|
|
354
372
|
* @requires ./TreeControls.vue
|
|
355
373
|
*/
|
|
356
374
|
export default {
|
|
@@ -358,7 +376,7 @@ export default {
|
|
|
358
376
|
components: {
|
|
359
377
|
MapSvgIcon,
|
|
360
378
|
MapSvgSpriteColor,
|
|
361
|
-
|
|
379
|
+
PrimitiveControls,
|
|
362
380
|
ScaffoldTooltip,
|
|
363
381
|
TreeControls,
|
|
364
382
|
},
|
|
@@ -526,6 +544,21 @@ export default {
|
|
|
526
544
|
type: Boolean,
|
|
527
545
|
default: true,
|
|
528
546
|
},
|
|
547
|
+
/**
|
|
548
|
+
* Specify the endpoint of the flatmap server.
|
|
549
|
+
* This is used by annotation service included in
|
|
550
|
+
* third party flatmapvuer library.
|
|
551
|
+
*/
|
|
552
|
+
flatmapAPI: {
|
|
553
|
+
type: String,
|
|
554
|
+
default: "https://mapcore-demo.org/current/flatmap/v3/"
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
provide() {
|
|
558
|
+
return {
|
|
559
|
+
flatmapAPI: this.flatmapAPI,
|
|
560
|
+
scaffoldUrl: this.url,
|
|
561
|
+
};
|
|
529
562
|
},
|
|
530
563
|
data: function () {
|
|
531
564
|
return {
|
|
@@ -594,9 +627,15 @@ export default {
|
|
|
594
627
|
visible: false,
|
|
595
628
|
x: 200,
|
|
596
629
|
y: 200,
|
|
630
|
+
active: false,
|
|
597
631
|
},
|
|
598
632
|
fileFormat: "metadata",
|
|
599
633
|
previousMarkerLabels: [],
|
|
634
|
+
viewingMode: "Exploration",
|
|
635
|
+
viewingModes: [
|
|
636
|
+
"Annotation",
|
|
637
|
+
"Exploration",
|
|
638
|
+
]
|
|
600
639
|
};
|
|
601
640
|
},
|
|
602
641
|
watch: {
|
|
@@ -969,6 +1008,7 @@ export default {
|
|
|
969
1008
|
? event.identifiers[0].data.id
|
|
970
1009
|
: event.identifiers[0].data.group;
|
|
971
1010
|
if (event.identifiers[0].coords) {
|
|
1011
|
+
this.tData.active = false;
|
|
972
1012
|
this.tData.visible = true;
|
|
973
1013
|
this.tData.label = id;
|
|
974
1014
|
if (event.identifiers[0].data.region)
|
|
@@ -1029,8 +1069,9 @@ export default {
|
|
|
1029
1069
|
*/
|
|
1030
1070
|
objectSelected: function (objects, propagate) {
|
|
1031
1071
|
this.selectedObjects = objects;
|
|
1032
|
-
if (this.selectedObjects && this.selectedObjects.length > 0)
|
|
1033
|
-
this.$refs.
|
|
1072
|
+
if (this.selectedObjects && this.selectedObjects.length > 0) {
|
|
1073
|
+
this.$refs.primitiveControls.setObject(this.selectedObjects[0]);
|
|
1074
|
+
}
|
|
1034
1075
|
this.$module.setSelectedByZincObjects(objects, undefined, propagate);
|
|
1035
1076
|
},
|
|
1036
1077
|
/**
|
|
@@ -1155,6 +1196,11 @@ export default {
|
|
|
1155
1196
|
);
|
|
1156
1197
|
}
|
|
1157
1198
|
} else {
|
|
1199
|
+
if (!name.includes("Search Results for")) {
|
|
1200
|
+
this.tData.active = true;
|
|
1201
|
+
} else {
|
|
1202
|
+
this.tData.active = false;
|
|
1203
|
+
}
|
|
1158
1204
|
this.tData.visible = true;
|
|
1159
1205
|
this.tData.label = name;
|
|
1160
1206
|
this.tData.x = coords.position.x;
|
|
@@ -1256,6 +1302,7 @@ export default {
|
|
|
1256
1302
|
//Unset the tracking
|
|
1257
1303
|
this.$module.setupLiveCoordinates(undefined);
|
|
1258
1304
|
}
|
|
1305
|
+
this.tData.active = false;
|
|
1259
1306
|
this.tData.visible = false;
|
|
1260
1307
|
this.tData.region = undefined;
|
|
1261
1308
|
},
|
|
@@ -1595,6 +1642,11 @@ export default {
|
|
|
1595
1642
|
}
|
|
1596
1643
|
}
|
|
1597
1644
|
|
|
1645
|
+
.backgroundSpacer {
|
|
1646
|
+
border-bottom: 1px solid #e4e7ed;
|
|
1647
|
+
margin-bottom: 10px;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1598
1650
|
.warning-icon {
|
|
1599
1651
|
color: $warning;
|
|
1600
1652
|
top: 15px;
|
|
@@ -1729,7 +1781,7 @@ export default {
|
|
|
1729
1781
|
background-color: #ffffff;
|
|
1730
1782
|
border: 1px solid $app-primary-color;
|
|
1731
1783
|
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
|
|
1732
|
-
height:
|
|
1784
|
+
height: 124px;
|
|
1733
1785
|
width: 128px;
|
|
1734
1786
|
min-width: 128px;
|
|
1735
1787
|
|
|
@@ -1741,6 +1793,10 @@ export default {
|
|
|
1741
1793
|
}
|
|
1742
1794
|
}
|
|
1743
1795
|
}
|
|
1796
|
+
|
|
1797
|
+
.el-row ~ .el-row {
|
|
1798
|
+
margin-top: 8px;
|
|
1799
|
+
}
|
|
1744
1800
|
}
|
|
1745
1801
|
|
|
1746
1802
|
::v-deep .open-map-popper {
|
|
@@ -1963,6 +2019,13 @@ export default {
|
|
|
1963
2019
|
color: rgb(48, 49, 51);
|
|
1964
2020
|
margin-left: 8px;
|
|
1965
2021
|
|
|
2022
|
+
&.viewing-mode {
|
|
2023
|
+
width: unset;
|
|
2024
|
+
::v-deep .el-input__inner {
|
|
2025
|
+
line-height:30px
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
|
|
1966
2029
|
::v-deep .el-input__inner {
|
|
1967
2030
|
color: $app-primary-color;
|
|
1968
2031
|
height: 22px;
|
|
@@ -1971,6 +2034,9 @@ export default {
|
|
|
1971
2034
|
border: none;
|
|
1972
2035
|
font-family: "Asap", sans-serif;
|
|
1973
2036
|
line-height: 22px;
|
|
2037
|
+
&is-focus, &:focus {
|
|
2038
|
+
border: 1px solid $app-primary-color;
|
|
2039
|
+
}
|
|
1974
2040
|
}
|
|
1975
2041
|
|
|
1976
2042
|
::v-deep .el-input,
|
|
@@ -1998,7 +2064,7 @@ export default {
|
|
|
1998
2064
|
font-family: "Asap", sans-serif;
|
|
1999
2065
|
}
|
|
2000
2066
|
|
|
2001
|
-
.
|
|
2067
|
+
.primitive-controls-box {
|
|
2002
2068
|
right: 0px;
|
|
2003
2069
|
bottom: 200px;
|
|
2004
2070
|
position: absolute;
|