@abi-software/scaffoldvuer 0.2.3-alpha-2 → 0.3.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.
Files changed (49) hide show
  1. package/.eslintrc.js +12 -12
  2. package/CHANGELOG.md +344 -316
  3. package/LICENSE +201 -201
  4. package/README.md +164 -164
  5. package/babel.config.js +14 -14
  6. package/dist/scaffoldvuer-wc.common.js +277 -34
  7. package/dist/scaffoldvuer-wc.umd.js +277 -34
  8. package/dist/scaffoldvuer-wc.umd.min.js +277 -34
  9. package/dist/scaffoldvuer.common.js +1252 -529
  10. package/dist/scaffoldvuer.common.js.map +1 -1
  11. package/dist/scaffoldvuer.css +1 -1
  12. package/dist/scaffoldvuer.umd.js +1252 -529
  13. package/dist/scaffoldvuer.umd.js.map +1 -1
  14. package/dist/scaffoldvuer.umd.min.js +1 -1
  15. package/dist/scaffoldvuer.umd.min.js.map +1 -1
  16. package/package-lock.json +18121 -18119
  17. package/package.json +89 -89
  18. package/public/index.html +17 -17
  19. package/src/App.vue +669 -669
  20. package/src/ScaffoldVuer-wc.js +13 -13
  21. package/src/app/DropZone.vue +114 -114
  22. package/src/app/ModelsInformation.js +35 -35
  23. package/src/app/ModelsTable.vue +113 -113
  24. package/src/app/TextureDemos.js +114 -114
  25. package/src/assets/_variables.scss +43 -43
  26. package/src/assets/styles.scss +7 -7
  27. package/src/components/OpacityControls.vue +123 -222
  28. package/src/components/PrimitiveControls.vue +173 -0
  29. package/src/components/ScaffoldTooltip.vue +142 -142
  30. package/src/components/ScaffoldVuer.md +44 -44
  31. package/src/components/ScaffoldVuer.vue +2007 -2007
  32. package/src/components/TextureSlidesControls.vue +272 -0
  33. package/src/components/TreeControls.vue +707 -699
  34. package/src/components/index.js +7 -7
  35. package/src/credential.json +12 -0
  36. package/src/main.js +14 -14
  37. package/src/scripts/BaseModule.js +80 -80
  38. package/src/scripts/RendererModule.js +289 -289
  39. package/src/scripts/WebGL.js +94 -94
  40. package/src/scripts/annotation.js +5 -5
  41. package/src/scripts/eventNotifier.js +66 -66
  42. package/src/scripts/graphicsHighlight.js +134 -134
  43. package/src/scripts/organsRenderer.js +587 -587
  44. package/src/scripts/search.js +182 -182
  45. package/src/scripts/utilities.js +146 -146
  46. package/styleguide.config.js +22 -22
  47. package/vue.config.js +41 -41
  48. package/src/components/test.pdf +0 -0
  49. package/src/searchControls.vue +0 -122
@@ -0,0 +1,173 @@
1
+ <template>
2
+ <div
3
+ v-show="material || isTextureSlides"
4
+ class="primitive-controls"
5
+ >
6
+ <el-drawer
7
+ custom-class="my-drawer"
8
+ :class="{
9
+ 'drawer-content': true,
10
+ 'opacity': material !== undefined,
11
+ 'texture-slides': isTextureSlides,
12
+ }"
13
+ :visible.sync="drawerOpen"
14
+ :append-to-body="false"
15
+ :modal-append-to-body="false"
16
+ size="300"
17
+ :with-header="false"
18
+ :wrapper-closable="false"
19
+ :modal="false"
20
+ >
21
+ <div
22
+ v-if="drawerOpen"
23
+ class="tab-button close"
24
+ @click="toggleDrawer"
25
+ >
26
+ <i class="el-icon-arrow-right" />
27
+ </div>
28
+ <opacity-controls
29
+ :material="material"
30
+ ref="opacityControls" />
31
+ <texture-slides-controls
32
+ v-show="isTextureSlides"
33
+ class="controls"
34
+ ref="tSlidesControls" />
35
+ </el-drawer>
36
+ <div
37
+ v-if="!drawerOpen"
38
+ class="tab-button open"
39
+ @click="toggleDrawer"
40
+ >
41
+ <i class="el-icon-arrow-left" />
42
+ </div>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ /* eslint-disable no-alert, no-console */
48
+ import Vue from "vue";
49
+ import OpacityControls from "./OpacityControls";
50
+ import TextureSlidesControls from "./TextureSlidesControls";
51
+ import { Drawer, Icon } from "element-ui";
52
+ import lang from "element-ui/lib/locale/lang/en";
53
+ import locale from "element-ui/lib/locale";
54
+
55
+ locale.use(lang);
56
+ Vue.use(Drawer);
57
+ Vue.use(Icon);
58
+
59
+ /**
60
+ * A component to control the opacity of the target object.
61
+ */
62
+ export default {
63
+ name: "PrimitiveControls",
64
+ components: {
65
+ OpacityControls,
66
+ TextureSlidesControls,
67
+ },
68
+ data: function() {
69
+ return {
70
+ material: undefined,
71
+ isTextureSlides: false,
72
+ drawerOpen: true,
73
+ };
74
+ },
75
+ mounted: function() {
76
+ this._zincobject = undefined;
77
+ },
78
+ methods: {
79
+ formatTooltip: function(val) {
80
+ this.displayString = Math.floor(100 * val + 0.5) + "%";
81
+ return this.displayString;
82
+ },
83
+ toggleDrawer: function() {
84
+ this.drawerOpen = !this.drawerOpen;
85
+ },
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
+ }
94
+ if (object && object.morph) this.material = object.morph.material;
95
+ else this.material = undefined;
96
+ this.$refs.opacityControls.setObject(object);
97
+ }
98
+ }
99
+ };
100
+ </script>
101
+
102
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
103
+ <style scoped lang="scss">
104
+ @import "~element-ui/packages/theme-chalk/src/container";
105
+ @import "~element-ui/packages/theme-chalk/src/drawer";
106
+ @import "~element-ui/packages/theme-chalk/src/slider";
107
+
108
+ .primitive-controls {
109
+ text-align: left;
110
+ width:350px;
111
+ pointer-events:none;
112
+ }
113
+
114
+ .display {
115
+ width: 44px;
116
+ }
117
+
118
+ .icon {
119
+ right: 17px;
120
+ position: absolute;
121
+ top: 10px;
122
+ }
123
+
124
+ .drawer-content {
125
+ position: relative;
126
+ &.opacity {
127
+ height: 93px;
128
+ }
129
+ &.texture-slides{
130
+ height: 250px;
131
+ }
132
+ }
133
+
134
+ ::v-deep .my-drawer {
135
+ background: rgba(0, 0, 0, 0);
136
+ box-shadow: none;
137
+ }
138
+
139
+ .tab-button {
140
+ width: 20px;
141
+ height: 40px;
142
+ z-index: 8;
143
+ right: 0px;
144
+
145
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
146
+ border: solid 1px #e4e7ed;
147
+ background-color: #FFFFFF;
148
+ text-align: center;
149
+ vertical-align: middle;
150
+ cursor: pointer;
151
+ pointer-events: auto;
152
+ //transition: bottom 0.3s;
153
+
154
+ &.close {
155
+ float: left;
156
+ flex: 1;
157
+ border-right: 0;
158
+ bottom: 26px;
159
+ }
160
+
161
+ &.open {
162
+ position: absolute;
163
+ bottom:26px;
164
+ }
165
+
166
+ i {
167
+ margin-top: 12px;
168
+ color: $app-primary-color;
169
+ transform: scaleY(2.5);
170
+ }
171
+ }
172
+
173
+ </style>
@@ -1,142 +1,142 @@
1
- <template>
2
- <div :style="position" class="region-tooltip">
3
- <el-popover
4
- ref="tooltip"
5
- v-model="display"
6
- placement="top"
7
- :visibleArrow="false"
8
- :append-to-body="false"
9
- trigger="manual"
10
- popper-class="tooltip-popper non-selectable"
11
- >
12
- <template v-popover:tooltip>
13
- <div class="tooltip-text">{{ label }}</div>
14
- <div class="tooltip-text" v-if="region">Region: {{ region }}</div>
15
- </template>
16
- </el-popover>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- /* eslint-disable no-alert, no-console */
22
- import Vue from "vue";
23
- import { Popover } from "element-ui";
24
- import lang from "element-ui/lib/locale/lang/en";
25
- import locale from "element-ui/lib/locale";
26
-
27
- locale.use(lang);
28
- Vue.use(Popover);
29
-
30
- /**
31
- * A component to control the opacity of the target object.
32
- */
33
- export default {
34
- name: "ScaffoldTooltip",
35
- props: {
36
- label: {
37
- type: String,
38
- default: "",
39
- },
40
- region: {
41
- type: String,
42
- default: "",
43
- },
44
- visible: {
45
- type: Boolean,
46
- default: false,
47
- },
48
- x: {
49
- type: Number,
50
- default: 200,
51
- },
52
- y: {
53
- type: Number,
54
- default: 200,
55
- },
56
- },
57
- data: function () {
58
- return {
59
- display: false,
60
- };
61
- },
62
- computed: {
63
- position: function () {
64
- let yOffset = 40;
65
- if (this.region) {
66
- yOffset = 55;
67
- }
68
- const x = this.x - 40;
69
- return { left: x + "px", top: this.y - yOffset + "px" };
70
- },
71
- },
72
- watch: {
73
- label: {
74
- handler: function () {
75
- if (this.visible && this.label && this.label !== "")
76
- this.display = true;
77
- else this.display = false;
78
- },
79
- immediate: true,
80
- },
81
- visible: {
82
- handler: function () {
83
- if (this.visible && this.label && this.label !== "")
84
- this.display = true;
85
- else this.display = false;
86
- },
87
- immediate: true,
88
- },
89
- },
90
- };
91
- </script>
92
-
93
- <!-- Add "scoped" attribute to limit CSS to this component only -->
94
- <style scoped lang="scss">
95
- @import "~element-ui/packages/theme-chalk/src/popover";
96
-
97
- .region-tooltip {
98
- position: absolute;
99
- height: 50px;
100
- z-index: 2;
101
- ::v-deep .tooltip-popper {
102
- padding: 2px 6px;
103
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
104
- font-size: 16px;
105
- color: $app-primary-color;
106
- background-color: #fff;
107
- border: 1px solid $app-primary-color;
108
- border-radius: 4px;
109
- white-space: nowrap;
110
- min-width: unset;
111
- pointer-events: none;
112
- top: -15px !important;
113
-
114
- &.el-popper[x-placement^="top"] {
115
- .popper__arrow {
116
- border-top-color: $app-primary-color !important;
117
- &:after {
118
- border-top-color: #fff !important;
119
- }
120
- }
121
- }
122
-
123
- &.el-popper[x-placement^="bottom"] {
124
- .popper__arrow {
125
- border-bottom-color: $app-primary-color !important;
126
- &:after {
127
- border-bottom-color: #fff !important;
128
- }
129
- }
130
- }
131
- }
132
-
133
- .tooltip-text {
134
- text-align: center;
135
- }
136
-
137
- ::v-deep .non-selectable {
138
- user-select: none;
139
- pointer-events: none;
140
- }
141
- }
142
- </style>
1
+ <template>
2
+ <div :style="position" class="region-tooltip">
3
+ <el-popover
4
+ ref="tooltip"
5
+ v-model="display"
6
+ placement="top"
7
+ :visibleArrow="false"
8
+ :append-to-body="false"
9
+ trigger="manual"
10
+ popper-class="tooltip-popper non-selectable"
11
+ >
12
+ <template v-popover:tooltip>
13
+ <div class="tooltip-text">{{ label }}</div>
14
+ <div class="tooltip-text" v-if="region">Region: {{ region }}</div>
15
+ </template>
16
+ </el-popover>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ /* eslint-disable no-alert, no-console */
22
+ import Vue from "vue";
23
+ import { Popover } from "element-ui";
24
+ import lang from "element-ui/lib/locale/lang/en";
25
+ import locale from "element-ui/lib/locale";
26
+
27
+ locale.use(lang);
28
+ Vue.use(Popover);
29
+
30
+ /**
31
+ * A component to control the opacity of the target object.
32
+ */
33
+ export default {
34
+ name: "ScaffoldTooltip",
35
+ props: {
36
+ label: {
37
+ type: String,
38
+ default: "",
39
+ },
40
+ region: {
41
+ type: String,
42
+ default: "",
43
+ },
44
+ visible: {
45
+ type: Boolean,
46
+ default: false,
47
+ },
48
+ x: {
49
+ type: Number,
50
+ default: 200,
51
+ },
52
+ y: {
53
+ type: Number,
54
+ default: 200,
55
+ },
56
+ },
57
+ data: function () {
58
+ return {
59
+ display: false,
60
+ };
61
+ },
62
+ computed: {
63
+ position: function () {
64
+ let yOffset = 40;
65
+ if (this.region) {
66
+ yOffset = 55;
67
+ }
68
+ const x = this.x - 40;
69
+ return { left: x + "px", top: this.y - yOffset + "px" };
70
+ },
71
+ },
72
+ watch: {
73
+ label: {
74
+ handler: function () {
75
+ if (this.visible && this.label && this.label !== "")
76
+ this.display = true;
77
+ else this.display = false;
78
+ },
79
+ immediate: true,
80
+ },
81
+ visible: {
82
+ handler: function () {
83
+ if (this.visible && this.label && this.label !== "")
84
+ this.display = true;
85
+ else this.display = false;
86
+ },
87
+ immediate: true,
88
+ },
89
+ },
90
+ };
91
+ </script>
92
+
93
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
94
+ <style scoped lang="scss">
95
+ @import "~element-ui/packages/theme-chalk/src/popover";
96
+
97
+ .region-tooltip {
98
+ position: absolute;
99
+ height: 50px;
100
+ z-index: 2;
101
+ ::v-deep .tooltip-popper {
102
+ padding: 2px 6px;
103
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
104
+ font-size: 16px;
105
+ color: $app-primary-color;
106
+ background-color: #fff;
107
+ border: 1px solid $app-primary-color;
108
+ border-radius: 4px;
109
+ white-space: nowrap;
110
+ min-width: unset;
111
+ pointer-events: none;
112
+ top: -15px !important;
113
+
114
+ &.el-popper[x-placement^="top"] {
115
+ .popper__arrow {
116
+ border-top-color: $app-primary-color !important;
117
+ &:after {
118
+ border-top-color: #fff !important;
119
+ }
120
+ }
121
+ }
122
+
123
+ &.el-popper[x-placement^="bottom"] {
124
+ .popper__arrow {
125
+ border-bottom-color: $app-primary-color !important;
126
+ &:after {
127
+ border-bottom-color: #fff !important;
128
+ }
129
+ }
130
+ }
131
+ }
132
+
133
+ .tooltip-text {
134
+ text-align: center;
135
+ }
136
+
137
+ ::v-deep .non-selectable {
138
+ user-select: none;
139
+ pointer-events: none;
140
+ }
141
+ }
142
+ </style>
@@ -1,44 +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
-
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
+