@abi-software/scaffoldvuer 0.2.2 → 0.2.3-alpha-2

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 (47) hide show
  1. package/.eslintrc.js +12 -12
  2. package/CHANGELOG.md +316 -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 +183 -35
  7. package/dist/scaffoldvuer-wc.umd.js +183 -35
  8. package/dist/scaffoldvuer-wc.umd.min.js +183 -35
  9. package/dist/scaffoldvuer.common.js +1086 -717
  10. package/dist/scaffoldvuer.common.js.map +1 -1
  11. package/dist/scaffoldvuer.css +1 -1
  12. package/dist/scaffoldvuer.umd.js +1086 -717
  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 +18119 -18121
  17. package/package.json +89 -89
  18. package/public/index.html +17 -17
  19. package/src/App.vue +669 -714
  20. package/src/ScaffoldVuer-wc.js +13 -13
  21. package/src/{components → app}/DropZone.vue +114 -114
  22. package/src/{components → app}/ModelsInformation.js +35 -35
  23. package/src/{components → app}/ModelsTable.vue +113 -113
  24. package/src/app/TextureDemos.js +114 -0
  25. package/src/assets/_variables.scss +43 -43
  26. package/src/assets/styles.scss +7 -7
  27. package/src/components/OpacityControls.vue +222 -222
  28. package/src/components/ScaffoldTooltip.vue +142 -141
  29. package/src/components/ScaffoldVuer.md +44 -44
  30. package/src/components/ScaffoldVuer.vue +2007 -1887
  31. package/src/components/TreeControls.vue +699 -691
  32. package/src/components/index.js +7 -7
  33. package/src/components/test.pdf +0 -0
  34. package/src/main.js +14 -14
  35. package/src/scripts/BaseModule.js +80 -80
  36. package/src/scripts/RendererModule.js +289 -289
  37. package/src/scripts/WebGL.js +94 -94
  38. package/src/scripts/annotation.js +5 -5
  39. package/src/scripts/eventNotifier.js +66 -66
  40. package/src/scripts/graphicsHighlight.js +134 -134
  41. package/src/scripts/organsRenderer.js +587 -606
  42. package/src/scripts/search.js +182 -153
  43. package/src/scripts/utilities.js +146 -43
  44. package/src/searchControls.vue +122 -0
  45. package/styleguide.config.js +22 -22
  46. package/vue.config.js +41 -41
  47. package/src/credential.json +0 -12
@@ -1,43 +1,43 @@
1
- // Primary colors
2
- $purple: #8300BF;
3
- $darkBlue: #24245B;
4
- $grey: #303133;
5
-
6
- // Secondary colors
7
- $lightPurple: #BC00FC;
8
- $blue: #0026FF;
9
-
10
- // Status colors
11
- $success: #5e9f69;
12
- $warning: #FF8400;
13
- $danger: #b51d09;
14
-
15
- // Text colors
16
- $neutralGrey: #616161;
17
- $mediumGrey: #606266;
18
- $lightGrey: #909399;
19
-
20
- // Line colors
21
- $lineColor1: #DCDFE6;
22
- $lineColor2: #E4E7ED;
23
-
24
- // Background colors
25
- $background: #F5F7FA;
26
- $cochlear: #FFFFFF;
27
-
28
- //Search box colors
29
- $darkGrey: #606266;
30
-
31
- $app-primary-color: $purple;
32
- $app-secondary-color: $darkBlue;
33
- $text-color: $grey;
34
- $input-text: $grey;
35
-
36
- $system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
37
- $font-family: 'Asap', sans-serif;
38
-
39
- // Viewport Sizes
40
- $viewport-sm: 20rem;
41
- $viewport-md: 47rem;
42
- $viewport-lg: 64rem;
43
- $viewport-xlg: 120rem;
1
+ // Primary colors
2
+ $purple: #8300BF;
3
+ $darkBlue: #24245B;
4
+ $grey: #303133;
5
+
6
+ // Secondary colors
7
+ $lightPurple: #BC00FC;
8
+ $blue: #0026FF;
9
+
10
+ // Status colors
11
+ $success: #5e9f69;
12
+ $warning: #FF8400;
13
+ $danger: #b51d09;
14
+
15
+ // Text colors
16
+ $neutralGrey: #616161;
17
+ $mediumGrey: #606266;
18
+ $lightGrey: #909399;
19
+
20
+ // Line colors
21
+ $lineColor1: #DCDFE6;
22
+ $lineColor2: #E4E7ED;
23
+
24
+ // Background colors
25
+ $background: #F5F7FA;
26
+ $cochlear: #FFFFFF;
27
+
28
+ //Search box colors
29
+ $darkGrey: #606266;
30
+
31
+ $app-primary-color: $purple;
32
+ $app-secondary-color: $darkBlue;
33
+ $text-color: $grey;
34
+ $input-text: $grey;
35
+
36
+ $system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
37
+ $font-family: 'Asap', sans-serif;
38
+
39
+ // Viewport Sizes
40
+ $viewport-sm: 20rem;
41
+ $viewport-md: 47rem;
42
+ $viewport-lg: 64rem;
43
+ $viewport-xlg: 120rem;
@@ -1,7 +1,7 @@
1
- @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
2
-
3
- @import '_variables';
4
-
5
- /* icon font path, required */
6
- $--color-primary: $app-primary-color !default;
7
- $--font-path: '~element-ui/lib/theme-chalk/fonts';
1
+ @import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
2
+
3
+ @import '_variables';
4
+
5
+ /* icon font path, required */
6
+ $--color-primary: $app-primary-color !default;
7
+ $--font-path: '~element-ui/lib/theme-chalk/fonts';
@@ -1,222 +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>
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>