@abi-software/mapintegratedvuer 0.7.2-vue3.0-alpha.0 → 1.0.1
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/LICENSE +201 -201
- package/README.md +150 -150
- package/assets/styleguide.css +19 -19
- package/cypress.config.js +23 -23
- package/dist/index.html +17 -17
- package/dist/mapintegratedvuer.js +74289 -73840
- package/dist/mapintegratedvuer.umd.cjs +878 -515
- package/dist/style.css +1 -1
- package/package.json +134 -135
- package/public/index.html +17 -17
- package/reporter-config.json +9 -9
- package/src/App.vue +245 -245
- package/src/assets/_variables.scss +43 -43
- package/src/assets/fonts/mapicon-species.eot +0 -0
- package/src/assets/fonts/mapicon-species.ttf +0 -0
- package/src/assets/fonts/mapicon-species.woff +0 -0
- package/src/assets/header-icon.scss +67 -67
- package/src/assets/mapicon-species-style.css +41 -41
- package/src/assets/styles.scss +9 -9
- package/src/components/ContentBar.vue +376 -376
- package/src/components/ContentVuer.vue +217 -217
- package/src/components/ContextCard.vue +385 -385
- package/src/components/ContextHelp.vue +73 -73
- package/src/components/CustomSplitter.vue +151 -151
- package/src/components/DatasetHeader.vue +97 -97
- package/src/components/DialogToolbarContent.vue +464 -464
- package/src/components/EventBus.js +3 -3
- package/src/components/FlatmapContextCard.vue +134 -134
- package/src/components/MapContent.vue +328 -333
- package/src/components/ResizeSensor.vue +47 -47
- package/src/components/SearchControls.vue +115 -115
- package/src/components/SimulatedData.js +721 -721
- package/src/components/SplitDialog.vue +287 -287
- package/src/components/SplitFlow.vue +414 -414
- package/src/components/index.js +7 -7
- package/src/components/markerZoomLevelsHardCoded.js +255 -255
- package/src/components/scripts/utilities.js +173 -173
- package/src/components/viewers/Flatmap.vue +145 -145
- package/src/components/viewers/Iframe.vue +31 -31
- package/src/components/viewers/MultiFlatmap.vue +384 -384
- package/src/components/viewers/Plot.vue +23 -23
- package/src/components/viewers/Scaffold.vue +198 -198
- package/src/components/viewers/Simulation.vue +21 -21
- package/src/icons/yellowstar.js +1 -1
- package/src/main.js +31 -31
- package/src/mixins/ContentMixin.js +438 -438
- package/src/mixins/DynamicMarkerMixin.js +88 -88
- package/src/mixins/S3Bucket.vue +37 -37
- package/src/stores/entries.js +40 -40
- package/src/stores/index.js +23 -23
- package/src/stores/settings.js +144 -144
- package/src/stores/splitFlow.js +523 -523
- package/static.json +7 -7
- package/vite.config.js +70 -70
- package/vite.static-build.js +12 -12
- package/vitest.workspace.js +3 -3
- package/vuese-generator.js +65 -65
- package/assets/gazelle-icons-no-background.css +0 -32
- package/dist/matterport.pdf +0 -0
- package/dist/test.txt +0 -0
- package/public/matterport.pdf +0 -0
- package/public/test.txt +0 -0
- package/q.json +0 -690
- package/src/mixins/RetrieveContextCardMixin.js +0 -82
- package/tsconfig.json +0 -19
@@ -1,73 +1,73 @@
|
|
1
|
-
<template>
|
2
|
-
<div v-if="showHelp" class="content-container">
|
3
|
-
<el-card class="box-card"
|
4
|
-
@mouseover="isActive = true"
|
5
|
-
@mouseleave="isActive = false"
|
6
|
-
:class="{active: isActive}">
|
7
|
-
<div slot="header" class="header">
|
8
|
-
<span>Needing some help?</span>
|
9
|
-
<i class="el-icon-close" style="float: right; padding: 3px 0" @click="close"></i>
|
10
|
-
</div>
|
11
|
-
<div class="content">
|
12
|
-
<div v-for="o in steps" :key="o" class="step-item">{{o.description}}</div>
|
13
|
-
</div>
|
14
|
-
</el-card>
|
15
|
-
</div>
|
16
|
-
</template>
|
17
|
-
|
18
|
-
<script>
|
19
|
-
/* eslint-disable no-alert, no-console */
|
20
|
-
import { ElCard as Card } from "element-plus";
|
21
|
-
|
22
|
-
export default {
|
23
|
-
name: "ContextHelp",
|
24
|
-
components: {
|
25
|
-
Card
|
26
|
-
},
|
27
|
-
props: {
|
28
|
-
/**
|
29
|
-
* Object containing information for
|
30
|
-
* the required viewing.
|
31
|
-
*/
|
32
|
-
entry: Object
|
33
|
-
},
|
34
|
-
data: function() {
|
35
|
-
return {
|
36
|
-
isActive: false,
|
37
|
-
showHelp: true,
|
38
|
-
steps: [
|
39
|
-
]
|
40
|
-
}
|
41
|
-
},
|
42
|
-
methods: {
|
43
|
-
close: function(){
|
44
|
-
this.showHelp = false
|
45
|
-
},
|
46
|
-
|
47
|
-
}
|
48
|
-
};
|
49
|
-
</script>
|
50
|
-
|
51
|
-
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
52
|
-
<style scoped lang="scss">
|
53
|
-
.step-item {
|
54
|
-
font-size: 14px;
|
55
|
-
margin-bottom: 18px;
|
56
|
-
text-align: left;
|
57
|
-
}
|
58
|
-
|
59
|
-
.header{
|
60
|
-
height: 20px;
|
61
|
-
}
|
62
|
-
|
63
|
-
.box-card {
|
64
|
-
width: 280px;
|
65
|
-
height: 280px;
|
66
|
-
overflow: auto;
|
67
|
-
}
|
68
|
-
|
69
|
-
.active {
|
70
|
-
width: 380px !important;
|
71
|
-
height: 380px !important;
|
72
|
-
}
|
73
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div v-if="showHelp" class="content-container">
|
3
|
+
<el-card class="box-card"
|
4
|
+
@mouseover="isActive = true"
|
5
|
+
@mouseleave="isActive = false"
|
6
|
+
:class="{active: isActive}">
|
7
|
+
<div slot="header" class="header">
|
8
|
+
<span>Needing some help?</span>
|
9
|
+
<i class="el-icon-close" style="float: right; padding: 3px 0" @click="close"></i>
|
10
|
+
</div>
|
11
|
+
<div class="content">
|
12
|
+
<div v-for="o in steps" :key="o" class="step-item">{{o.description}}</div>
|
13
|
+
</div>
|
14
|
+
</el-card>
|
15
|
+
</div>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
/* eslint-disable no-alert, no-console */
|
20
|
+
import { ElCard as Card } from "element-plus";
|
21
|
+
|
22
|
+
export default {
|
23
|
+
name: "ContextHelp",
|
24
|
+
components: {
|
25
|
+
Card
|
26
|
+
},
|
27
|
+
props: {
|
28
|
+
/**
|
29
|
+
* Object containing information for
|
30
|
+
* the required viewing.
|
31
|
+
*/
|
32
|
+
entry: Object
|
33
|
+
},
|
34
|
+
data: function() {
|
35
|
+
return {
|
36
|
+
isActive: false,
|
37
|
+
showHelp: true,
|
38
|
+
steps: [
|
39
|
+
]
|
40
|
+
}
|
41
|
+
},
|
42
|
+
methods: {
|
43
|
+
close: function(){
|
44
|
+
this.showHelp = false
|
45
|
+
},
|
46
|
+
|
47
|
+
}
|
48
|
+
};
|
49
|
+
</script>
|
50
|
+
|
51
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
52
|
+
<style scoped lang="scss">
|
53
|
+
.step-item {
|
54
|
+
font-size: 14px;
|
55
|
+
margin-bottom: 18px;
|
56
|
+
text-align: left;
|
57
|
+
}
|
58
|
+
|
59
|
+
.header{
|
60
|
+
height: 20px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.box-card {
|
64
|
+
width: 280px;
|
65
|
+
height: 280px;
|
66
|
+
overflow: auto;
|
67
|
+
}
|
68
|
+
|
69
|
+
.active {
|
70
|
+
width: 380px !important;
|
71
|
+
height: 380px !important;
|
72
|
+
}
|
73
|
+
</style>
|
@@ -1,151 +1,151 @@
|
|
1
|
-
<template>
|
2
|
-
<div style="height: 100%; width: 100%">
|
3
|
-
<resize-sensor
|
4
|
-
@resize="calculateStyles(index)">
|
5
|
-
</resize-sensor>
|
6
|
-
<splitpanes
|
7
|
-
class="default-theme"
|
8
|
-
:horizontal="isHorizontal"
|
9
|
-
:dbl-click-splitter="false"
|
10
|
-
>
|
11
|
-
<template v-for="(child) in children" :key="child">
|
12
|
-
<pane :ref="child" @vue:beforeUnmount="childUnmounted(child)">
|
13
|
-
<resize-sensor
|
14
|
-
v-if="customLayout[child].content"
|
15
|
-
@resize="calculateStyles(child)">
|
16
|
-
</resize-sensor>
|
17
|
-
<custom-splitter
|
18
|
-
v-else
|
19
|
-
:key="child"
|
20
|
-
:index="child"
|
21
|
-
/>
|
22
|
-
</pane>
|
23
|
-
</template>
|
24
|
-
</splitpanes>
|
25
|
-
</div>
|
26
|
-
</template>
|
27
|
-
|
28
|
-
|
29
|
-
<script>
|
30
|
-
/* eslint-disable no-alert, no-console */
|
31
|
-
import EventBus from './EventBus';
|
32
|
-
import ResizeSensor from "./ResizeSensor.vue";
|
33
|
-
import { Splitpanes, Pane } from "splitpanes";
|
34
|
-
import "splitpanes/dist/splitpanes.css";
|
35
|
-
import { mapStores } from 'pinia';
|
36
|
-
import { useSplitFlowStore } from '../stores/splitFlow';
|
37
|
-
|
38
|
-
export default {
|
39
|
-
name: "CustomSplitter",
|
40
|
-
components: {
|
41
|
-
Splitpanes,
|
42
|
-
Pane,
|
43
|
-
ResizeSensor
|
44
|
-
},
|
45
|
-
props: {
|
46
|
-
index: {
|
47
|
-
type: String,
|
48
|
-
default: function() {
|
49
|
-
return "split-1";
|
50
|
-
}
|
51
|
-
}
|
52
|
-
},
|
53
|
-
methods: {
|
54
|
-
requestStylesUpdate: function(refName) {
|
55
|
-
if (this.$refs) {
|
56
|
-
if (refName in this.$refs && this.$refs[refName] &&
|
57
|
-
this.$refs[refName][0] && this.$refs[refName][0].$el) {
|
58
|
-
const el = this.$refs[refName][0].$el;
|
59
|
-
const rect = el.getBoundingClientRect();
|
60
|
-
EventBus.emit("PaneResize", {refName, rect});
|
61
|
-
|
62
|
-
}
|
63
|
-
}
|
64
|
-
},
|
65
|
-
/**
|
66
|
-
* Callback when the vuers emit a selected event.
|
67
|
-
*/
|
68
|
-
calculateStyles: function(refName) {
|
69
|
-
if (this.$refs) {
|
70
|
-
if (refName.startsWith("pane")) {
|
71
|
-
this.requestStylesUpdate(refName);
|
72
|
-
} else if (refName.startsWith("split")) {
|
73
|
-
this.customLayout[refName].children.forEach((childName) => {
|
74
|
-
if (childName.startsWith("pane")) {
|
75
|
-
this.requestStylesUpdate(childName);
|
76
|
-
}
|
77
|
-
});
|
78
|
-
}
|
79
|
-
}
|
80
|
-
},
|
81
|
-
childUnmounted: function(refName) {
|
82
|
-
EventBus.emit("PaneUnmounted", {refName});
|
83
|
-
}
|
84
|
-
},
|
85
|
-
computed: {
|
86
|
-
...mapStores(useSplitFlowStore),
|
87
|
-
children() {
|
88
|
-
return this.customLayout[this.index].children;
|
89
|
-
},
|
90
|
-
customLayout() {
|
91
|
-
return this.splitFlowStore.customLayout;
|
92
|
-
},
|
93
|
-
isHorizontal() {
|
94
|
-
return this.customLayout[this.index].horizontal;
|
95
|
-
},
|
96
|
-
},
|
97
|
-
};
|
98
|
-
</script>
|
99
|
-
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
100
|
-
<style scoped lang="scss">
|
101
|
-
|
102
|
-
:deep() {
|
103
|
-
.splitpanes.default-theme .splitpanes__pane {
|
104
|
-
background-color: #ccc !important;
|
105
|
-
position: relative;
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
:deep(.splitpanes__splitter) {
|
110
|
-
margin: 0px 0px 0px 0px !important;
|
111
|
-
z-index: 6 !important;
|
112
|
-
&::before {
|
113
|
-
content: "";
|
114
|
-
position: absolute;
|
115
|
-
left: 0;
|
116
|
-
top: 0;
|
117
|
-
transition: opacity 0.4s;
|
118
|
-
background-color: rgba(131, 0, 191, 0.3) !important;
|
119
|
-
opacity: 0;
|
120
|
-
z-index: 7 !important;
|
121
|
-
&:hover {
|
122
|
-
opacity: 1;
|
123
|
-
}
|
124
|
-
}
|
125
|
-
}
|
126
|
-
|
127
|
-
:deep(.splitpanes--horizontal > .splitpanes__splitter),
|
128
|
-
:deep(.splitpanes--vertical > .splitpanes__splitter) {
|
129
|
-
background-color: #ccc !important;
|
130
|
-
border-left: unset;
|
131
|
-
}
|
132
|
-
|
133
|
-
:deep(.splitpanes--horizontal > .splitpanes__splitter) {
|
134
|
-
height: 1px;
|
135
|
-
&::before {
|
136
|
-
top: -2px;
|
137
|
-
height: 10px;
|
138
|
-
width: 100%;
|
139
|
-
}
|
140
|
-
}
|
141
|
-
|
142
|
-
:deep(.splitpanes--vertical > .splitpanes__splitter) {
|
143
|
-
width: 1px;
|
144
|
-
&::before {
|
145
|
-
left: -3px;
|
146
|
-
width: 11px;
|
147
|
-
height: 100%;
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div style="height: 100%; width: 100%">
|
3
|
+
<resize-sensor
|
4
|
+
@resize="calculateStyles(index)">
|
5
|
+
</resize-sensor>
|
6
|
+
<splitpanes
|
7
|
+
class="default-theme"
|
8
|
+
:horizontal="isHorizontal"
|
9
|
+
:dbl-click-splitter="false"
|
10
|
+
>
|
11
|
+
<template v-for="(child) in children" :key="child">
|
12
|
+
<pane :ref="child" @vue:beforeUnmount="childUnmounted(child)">
|
13
|
+
<resize-sensor
|
14
|
+
v-if="customLayout[child].content"
|
15
|
+
@resize="calculateStyles(child)">
|
16
|
+
</resize-sensor>
|
17
|
+
<custom-splitter
|
18
|
+
v-else
|
19
|
+
:key="child"
|
20
|
+
:index="child"
|
21
|
+
/>
|
22
|
+
</pane>
|
23
|
+
</template>
|
24
|
+
</splitpanes>
|
25
|
+
</div>
|
26
|
+
</template>
|
27
|
+
|
28
|
+
|
29
|
+
<script>
|
30
|
+
/* eslint-disable no-alert, no-console */
|
31
|
+
import EventBus from './EventBus';
|
32
|
+
import ResizeSensor from "./ResizeSensor.vue";
|
33
|
+
import { Splitpanes, Pane } from "splitpanes";
|
34
|
+
import "splitpanes/dist/splitpanes.css";
|
35
|
+
import { mapStores } from 'pinia';
|
36
|
+
import { useSplitFlowStore } from '../stores/splitFlow';
|
37
|
+
|
38
|
+
export default {
|
39
|
+
name: "CustomSplitter",
|
40
|
+
components: {
|
41
|
+
Splitpanes,
|
42
|
+
Pane,
|
43
|
+
ResizeSensor
|
44
|
+
},
|
45
|
+
props: {
|
46
|
+
index: {
|
47
|
+
type: String,
|
48
|
+
default: function() {
|
49
|
+
return "split-1";
|
50
|
+
}
|
51
|
+
}
|
52
|
+
},
|
53
|
+
methods: {
|
54
|
+
requestStylesUpdate: function(refName) {
|
55
|
+
if (this.$refs) {
|
56
|
+
if (refName in this.$refs && this.$refs[refName] &&
|
57
|
+
this.$refs[refName][0] && this.$refs[refName][0].$el) {
|
58
|
+
const el = this.$refs[refName][0].$el;
|
59
|
+
const rect = el.getBoundingClientRect();
|
60
|
+
EventBus.emit("PaneResize", {refName, rect});
|
61
|
+
|
62
|
+
}
|
63
|
+
}
|
64
|
+
},
|
65
|
+
/**
|
66
|
+
* Callback when the vuers emit a selected event.
|
67
|
+
*/
|
68
|
+
calculateStyles: function(refName) {
|
69
|
+
if (this.$refs) {
|
70
|
+
if (refName.startsWith("pane")) {
|
71
|
+
this.requestStylesUpdate(refName);
|
72
|
+
} else if (refName.startsWith("split")) {
|
73
|
+
this.customLayout[refName].children.forEach((childName) => {
|
74
|
+
if (childName.startsWith("pane")) {
|
75
|
+
this.requestStylesUpdate(childName);
|
76
|
+
}
|
77
|
+
});
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
childUnmounted: function(refName) {
|
82
|
+
EventBus.emit("PaneUnmounted", {refName});
|
83
|
+
}
|
84
|
+
},
|
85
|
+
computed: {
|
86
|
+
...mapStores(useSplitFlowStore),
|
87
|
+
children() {
|
88
|
+
return this.customLayout[this.index].children;
|
89
|
+
},
|
90
|
+
customLayout() {
|
91
|
+
return this.splitFlowStore.customLayout;
|
92
|
+
},
|
93
|
+
isHorizontal() {
|
94
|
+
return this.customLayout[this.index].horizontal;
|
95
|
+
},
|
96
|
+
},
|
97
|
+
};
|
98
|
+
</script>
|
99
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
100
|
+
<style scoped lang="scss">
|
101
|
+
|
102
|
+
:deep() {
|
103
|
+
.splitpanes.default-theme .splitpanes__pane {
|
104
|
+
background-color: #ccc !important;
|
105
|
+
position: relative;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
:deep(.splitpanes__splitter) {
|
110
|
+
margin: 0px 0px 0px 0px !important;
|
111
|
+
z-index: 6 !important;
|
112
|
+
&::before {
|
113
|
+
content: "";
|
114
|
+
position: absolute;
|
115
|
+
left: 0;
|
116
|
+
top: 0;
|
117
|
+
transition: opacity 0.4s;
|
118
|
+
background-color: rgba(131, 0, 191, 0.3) !important;
|
119
|
+
opacity: 0;
|
120
|
+
z-index: 7 !important;
|
121
|
+
&:hover {
|
122
|
+
opacity: 1;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
:deep(.splitpanes--horizontal > .splitpanes__splitter),
|
128
|
+
:deep(.splitpanes--vertical > .splitpanes__splitter) {
|
129
|
+
background-color: #ccc !important;
|
130
|
+
border-left: unset;
|
131
|
+
}
|
132
|
+
|
133
|
+
:deep(.splitpanes--horizontal > .splitpanes__splitter) {
|
134
|
+
height: 1px;
|
135
|
+
&::before {
|
136
|
+
top: -2px;
|
137
|
+
height: 10px;
|
138
|
+
width: 100%;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
:deep(.splitpanes--vertical > .splitpanes__splitter) {
|
143
|
+
width: 1px;
|
144
|
+
&::before {
|
145
|
+
left: -3px;
|
146
|
+
width: 11px;
|
147
|
+
height: 100%;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
</style>
|
@@ -1,97 +1,97 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="dataset-title-container" ref="container" @mouseleave="cardDisplayed=false">
|
3
|
-
<div @click="openCard($event)" class="dataset-link">
|
4
|
-
<el-link class="dataset-title">
|
5
|
-
{{entry.datasetTitle}}
|
6
|
-
<i v-show="!cardDisplayed && (entry.datasetImage || entry.datasetDescription)" class="el-icon-arrow-down el-icon--right"></i>
|
7
|
-
<i v-show="cardDisplayed && (entry.datasetImage || entry.datasetDescription)" class="el-icon-arrow-up el-icon--right"></i>
|
8
|
-
</el-link>
|
9
|
-
<el-card v-show="cardDisplayed" :body-style="{ padding: '0px' }" class="dataset-card" ref="card">
|
10
|
-
<img :src="entry.datasetImage" class="image"/>
|
11
|
-
<div style="padding: 14px;">
|
12
|
-
<span class="dataset-description">{{entry.datasetDescription}}</span>
|
13
|
-
<div >
|
14
|
-
<el-button class="button" @click="openDatasetUrl()">Get Dataset</el-button>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
</el-card>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</template>
|
21
|
-
|
22
|
-
|
23
|
-
<script>
|
24
|
-
/* eslint-disable no-alert, no-console */
|
25
|
-
import {
|
26
|
-
ElButton as Button,
|
27
|
-
ElCard as Card,
|
28
|
-
ElLink as Link
|
29
|
-
} from "element-plus";
|
30
|
-
|
31
|
-
|
32
|
-
export default {
|
33
|
-
name: "DatasetHeader",
|
34
|
-
components: {
|
35
|
-
Button,
|
36
|
-
Card,
|
37
|
-
Link
|
38
|
-
},
|
39
|
-
props: {
|
40
|
-
/**
|
41
|
-
* Object containing information for
|
42
|
-
* the required viewing.
|
43
|
-
*/
|
44
|
-
entry: Object,
|
45
|
-
},
|
46
|
-
data: function() {
|
47
|
-
return {
|
48
|
-
cardDisplayed: false
|
49
|
-
}
|
50
|
-
},
|
51
|
-
methods: {
|
52
|
-
switchCardDisplay: function(){
|
53
|
-
this.cardDisplayed = !this.cardDisplayed;
|
54
|
-
},
|
55
|
-
openCard: function(event){
|
56
|
-
if (this.entry.datasetImage || this.entry.datasetDescription) {
|
57
|
-
this.cardDisplayed = true;
|
58
|
-
this.$refs.card.$el.style.left = event.layerX + 'px';
|
59
|
-
this.$refs.card.$el.style.top = event.layerY + 'px';
|
60
|
-
} else {
|
61
|
-
this.openDatasetUrl();
|
62
|
-
}
|
63
|
-
},
|
64
|
-
openDatasetUrl: function(){
|
65
|
-
if (this.entry.datasetUrl)
|
66
|
-
window.open(this.entry.datasetUrl, '_blank');
|
67
|
-
this.cardDisplayed = false;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
};
|
71
|
-
</script>
|
72
|
-
|
73
|
-
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
74
|
-
<style scoped lang="scss">
|
75
|
-
.dataset-link{
|
76
|
-
text-align:center;
|
77
|
-
}
|
78
|
-
.dataset-title-container{
|
79
|
-
padding: 3px;
|
80
|
-
}
|
81
|
-
.dataset-title{
|
82
|
-
font-size: 16px;
|
83
|
-
color: #606266;
|
84
|
-
}
|
85
|
-
.dataset-card{
|
86
|
-
width: 230px;
|
87
|
-
position: absolute;
|
88
|
-
z-index: 10;
|
89
|
-
}
|
90
|
-
.image{
|
91
|
-
width: 100%;
|
92
|
-
display: block;
|
93
|
-
}
|
94
|
-
.dataset-description{
|
95
|
-
font-size: 10px;
|
96
|
-
}
|
97
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="dataset-title-container" ref="container" @mouseleave="cardDisplayed=false">
|
3
|
+
<div @click="openCard($event)" class="dataset-link">
|
4
|
+
<el-link class="dataset-title">
|
5
|
+
{{entry.datasetTitle}}
|
6
|
+
<i v-show="!cardDisplayed && (entry.datasetImage || entry.datasetDescription)" class="el-icon-arrow-down el-icon--right"></i>
|
7
|
+
<i v-show="cardDisplayed && (entry.datasetImage || entry.datasetDescription)" class="el-icon-arrow-up el-icon--right"></i>
|
8
|
+
</el-link>
|
9
|
+
<el-card v-show="cardDisplayed" :body-style="{ padding: '0px' }" class="dataset-card" ref="card">
|
10
|
+
<img :src="entry.datasetImage" class="image"/>
|
11
|
+
<div style="padding: 14px;">
|
12
|
+
<span class="dataset-description">{{entry.datasetDescription}}</span>
|
13
|
+
<div >
|
14
|
+
<el-button class="button" @click="openDatasetUrl()">Get Dataset</el-button>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</el-card>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
|
23
|
+
<script>
|
24
|
+
/* eslint-disable no-alert, no-console */
|
25
|
+
import {
|
26
|
+
ElButton as Button,
|
27
|
+
ElCard as Card,
|
28
|
+
ElLink as Link
|
29
|
+
} from "element-plus";
|
30
|
+
|
31
|
+
|
32
|
+
export default {
|
33
|
+
name: "DatasetHeader",
|
34
|
+
components: {
|
35
|
+
Button,
|
36
|
+
Card,
|
37
|
+
Link
|
38
|
+
},
|
39
|
+
props: {
|
40
|
+
/**
|
41
|
+
* Object containing information for
|
42
|
+
* the required viewing.
|
43
|
+
*/
|
44
|
+
entry: Object,
|
45
|
+
},
|
46
|
+
data: function() {
|
47
|
+
return {
|
48
|
+
cardDisplayed: false
|
49
|
+
}
|
50
|
+
},
|
51
|
+
methods: {
|
52
|
+
switchCardDisplay: function(){
|
53
|
+
this.cardDisplayed = !this.cardDisplayed;
|
54
|
+
},
|
55
|
+
openCard: function(event){
|
56
|
+
if (this.entry.datasetImage || this.entry.datasetDescription) {
|
57
|
+
this.cardDisplayed = true;
|
58
|
+
this.$refs.card.$el.style.left = event.layerX + 'px';
|
59
|
+
this.$refs.card.$el.style.top = event.layerY + 'px';
|
60
|
+
} else {
|
61
|
+
this.openDatasetUrl();
|
62
|
+
}
|
63
|
+
},
|
64
|
+
openDatasetUrl: function(){
|
65
|
+
if (this.entry.datasetUrl)
|
66
|
+
window.open(this.entry.datasetUrl, '_blank');
|
67
|
+
this.cardDisplayed = false;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
};
|
71
|
+
</script>
|
72
|
+
|
73
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
74
|
+
<style scoped lang="scss">
|
75
|
+
.dataset-link{
|
76
|
+
text-align:center;
|
77
|
+
}
|
78
|
+
.dataset-title-container{
|
79
|
+
padding: 3px;
|
80
|
+
}
|
81
|
+
.dataset-title{
|
82
|
+
font-size: 16px;
|
83
|
+
color: #606266;
|
84
|
+
}
|
85
|
+
.dataset-card{
|
86
|
+
width: 230px;
|
87
|
+
position: absolute;
|
88
|
+
z-index: 10;
|
89
|
+
}
|
90
|
+
.image{
|
91
|
+
width: 100%;
|
92
|
+
display: block;
|
93
|
+
}
|
94
|
+
.dataset-description{
|
95
|
+
font-size: 10px;
|
96
|
+
}
|
97
|
+
</style>
|