@abi-software/scaffoldvuer 0.1.1 → 0.1.5-1.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.
@@ -0,0 +1,4378 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = "fae3");
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ "022d":
91
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
+
93
+ "use strict";
94
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TraditionalControls_vue_vue_type_style_index_0_id_b034523c_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("21c9");
95
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TraditionalControls_vue_vue_type_style_index_0_id_b034523c_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TraditionalControls_vue_vue_type_style_index_0_id_b034523c_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
96
+ /* unused harmony reexport * */
97
+
98
+
99
+ /***/ }),
100
+
101
+ /***/ "02ac":
102
+ /***/ (function(module, exports) {
103
+
104
+ module.exports = require("core-js/modules/es.symbol.iterator");
105
+
106
+ /***/ }),
107
+
108
+ /***/ "0607":
109
+ /***/ (function(module, exports) {
110
+
111
+ module.exports = require("element-ui/lib/checkbox-group");
112
+
113
+ /***/ }),
114
+
115
+ /***/ "0cf4":
116
+ /***/ (function(module, exports) {
117
+
118
+ module.exports = require("element-ui/lib/theme-chalk/checkbox-group.css");
119
+
120
+ /***/ }),
121
+
122
+ /***/ "0de2":
123
+ /***/ (function(module, exports) {
124
+
125
+ module.exports = require("element-ui/lib/select");
126
+
127
+ /***/ }),
128
+
129
+ /***/ "0fe2":
130
+ /***/ (function(module, exports) {
131
+
132
+ module.exports = require("element-ui/lib/theme-chalk/select.css");
133
+
134
+ /***/ }),
135
+
136
+ /***/ "10c9":
137
+ /***/ (function(module, exports) {
138
+
139
+ /**
140
+ * @author alteredq / http://alteredqualia.com/
141
+ * @author mr.doob / http://mrdoob.com/
142
+ */
143
+
144
+ exports.WEBGL = {
145
+
146
+ isWebGLAvailable: function () {
147
+
148
+ try {
149
+
150
+ var canvas = document.createElement( 'canvas' );
151
+ return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) );
152
+
153
+ } catch ( e ) {
154
+
155
+ return false;
156
+
157
+ }
158
+
159
+ },
160
+
161
+ isWebGL2Available: function () {
162
+
163
+ try {
164
+
165
+ var canvas = document.createElement( 'canvas' );
166
+ return !! ( window.WebGL2RenderingContext && canvas.getContext( 'webgl2' ) );
167
+
168
+ } catch ( e ) {
169
+
170
+ return false;
171
+
172
+ }
173
+
174
+ },
175
+
176
+ getWebGLErrorMessage: function () {
177
+
178
+ return this.getErrorMessage( 1 );
179
+
180
+ },
181
+
182
+ getWebGL2ErrorMessage: function () {
183
+
184
+ return this.getErrorMessage( 2 );
185
+
186
+ },
187
+
188
+ getErrorMessage: function ( version ) {
189
+
190
+ var names = {
191
+ 1: 'WebGL',
192
+ 2: 'WebGL 2'
193
+ };
194
+
195
+ var contexts = {
196
+ 1: window.WebGLRenderingContext,
197
+ 2: window.WebGL2RenderingContext
198
+ };
199
+
200
+ var message = 'This module requires <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#008">$1</a> support but your $0 does not seem to support it.';
201
+
202
+ var element = document.createElement( 'div' );
203
+ element.id = 'webglmessage';
204
+ element.style.fontFamily = 'monospace';
205
+ element.style.fontSize = '20px';
206
+ element.style.fontWeight = 'normal';
207
+ element.style.textAlign = 'center';
208
+ element.style.background = '#fff';
209
+ element.style.color = '#000';
210
+ element.style.padding = '1.5em';
211
+ element.style.width = '400px';
212
+ element.style.margin = '5em auto 0';
213
+
214
+ if ( contexts[ version ] ) {
215
+
216
+ message = message.replace( '$0', 'graphics card' );
217
+
218
+ } else {
219
+
220
+ message = message.replace( '$0', 'browser' );
221
+
222
+ }
223
+
224
+ message = message.replace( '$1', names[ version ] );
225
+
226
+ element.innerHTML = message;
227
+
228
+ return element;
229
+
230
+ }
231
+
232
+ };
233
+
234
+
235
+ /***/ }),
236
+
237
+ /***/ "139f":
238
+ /***/ (function(module, exports) {
239
+
240
+ module.exports = require("core-js/modules/es.array.for-each");
241
+
242
+ /***/ }),
243
+
244
+ /***/ "1823":
245
+ /***/ (function(module, exports) {
246
+
247
+ module.exports = "precision highp float;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec3 color;\nattribute vec2 uv;\nattribute vec3 position_1;\nattribute vec3 position_2;\nattribute vec2 uv_1;\nattribute vec2 uv_2;\n\nuniform float time;\nuniform float slide_pos;\nvarying vec2 vUv;\n\nvoid main() {\n\tvUv = uv;\n\t\n\tvec3 transformed_xi1 = position * vec3(1.0 - time) + position_1 * vec3(time);\n\t\n\tvec3 xi0_time_1 = vec3(position_1.x, position_1.y, 0.0);\n\tvec3 transformed_xi0 = position_2 * vec3(1.0 - time) + xi0_time_1 * vec3(time);\n\n\tvec3 transformed = vec3(transformed_xi0) * vec3(1.0 - slide_pos) + vec3(transformed_xi1) * vec3(slide_pos);\n\t\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\n}\n"
248
+
249
+ /***/ }),
250
+
251
+ /***/ "18d2":
252
+ /***/ (function(module, exports) {
253
+
254
+ module.exports = require("core-js/modules/es.array.concat");
255
+
256
+ /***/ }),
257
+
258
+ /***/ "1ac9":
259
+ /***/ (function(module, exports) {
260
+
261
+ module.exports = require("element-ui/lib/container");
262
+
263
+ /***/ }),
264
+
265
+ /***/ "1ce0":
266
+ /***/ (function(module, exports) {
267
+
268
+ module.exports = require("core-js/modules/web.dom-collections.iterator");
269
+
270
+ /***/ }),
271
+
272
+ /***/ "1fe8":
273
+ /***/ (function(module, exports) {
274
+
275
+ module.exports = require("element-ui/lib/main");
276
+
277
+ /***/ }),
278
+
279
+ /***/ "2175":
280
+ /***/ (function(module, exports) {
281
+
282
+ module.exports = require("core-js/modules/es.object.keys");
283
+
284
+ /***/ }),
285
+
286
+ /***/ "21a1":
287
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
288
+
289
+ "use strict";
290
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_OpacityControls_vue_vue_type_style_index_0_id_4c00a30f_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5810");
291
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_OpacityControls_vue_vue_type_style_index_0_id_4c00a30f_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_OpacityControls_vue_vue_type_style_index_0_id_4c00a30f_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
292
+ /* unused harmony reexport * */
293
+
294
+
295
+ /***/ }),
296
+
297
+ /***/ "21c9":
298
+ /***/ (function(module, exports, __webpack_require__) {
299
+
300
+ // extracted by mini-css-extract-plugin
301
+
302
+ /***/ }),
303
+
304
+ /***/ "2a6f":
305
+ /***/ (function(module, exports) {
306
+
307
+ module.exports = require("core-js/modules/web.url");
308
+
309
+ /***/ }),
310
+
311
+ /***/ "2c1b":
312
+ /***/ (function(module, exports) {
313
+
314
+ module.exports = require("element-ui/lib/theme-chalk/loading.css");
315
+
316
+ /***/ }),
317
+
318
+ /***/ "2de2":
319
+ /***/ (function(module, exports) {
320
+
321
+ module.exports = require("element-ui/lib/header");
322
+
323
+ /***/ }),
324
+
325
+ /***/ "3170":
326
+ /***/ (function(module, exports) {
327
+
328
+ module.exports = require("element-ui/lib/theme-chalk/tabs.css");
329
+
330
+ /***/ }),
331
+
332
+ /***/ "319f":
333
+ /***/ (function(module, exports) {
334
+
335
+ module.exports = require("core-js/modules/es.number.to-fixed");
336
+
337
+ /***/ }),
338
+
339
+ /***/ "31fb":
340
+ /***/ (function(module, exports) {
341
+
342
+ module.exports = require("element-ui/lib/tab-pane");
343
+
344
+ /***/ }),
345
+
346
+ /***/ "3666":
347
+ /***/ (function(module, exports) {
348
+
349
+ module.exports = require("element-ui/lib/theme-chalk/color-picker.css");
350
+
351
+ /***/ }),
352
+
353
+ /***/ "373b":
354
+ /***/ (function(module, exports) {
355
+
356
+ module.exports = require("element-ui/lib/drawer");
357
+
358
+ /***/ }),
359
+
360
+ /***/ "3966":
361
+ /***/ (function(module, exports, __webpack_require__) {
362
+
363
+ var MODULE_CHANGE = { ALL: 0, DESTROYED: 1, NAME_CHANGED: 2, SETTINGS_CHANGED: 3 };
364
+
365
+ var BaseModule = function() {
366
+ this.typeName = "Base Module";
367
+ this.instanceName = "default";
368
+ this.onChangedCallbacks = [];
369
+ this.messageFunction = undefined;
370
+ /** Notifier handle for informing other modules of any changes **/
371
+ this.eventNotifiers = [];
372
+ this.broadcastChannels = {};
373
+ }
374
+
375
+ BaseModule.prototype.setName = function(name) {
376
+ if (name && this.instanceName !== name) {
377
+ this.instanceName = name;
378
+ var callbackArray = this.onChangedCallbacks.slice();
379
+ for (var i = 0; i < callbackArray.length; i++) {
380
+ callbackArray[i]( this, MODULE_CHANGE.NAME_CHANGED );
381
+ }
382
+ }
383
+ }
384
+
385
+ BaseModule.prototype.addBroadcastChannels = function(ChannelName) {
386
+ if (ChannelName in this.broadcastChannels)
387
+ return false;
388
+ var newChannel = new (__webpack_require__("c45a")).default(ChannelName);
389
+ this.broadcastChannels[ChannelName] = newChannel;
390
+ return true;
391
+ }
392
+
393
+ BaseModule.prototype.removeBroadcastChannels = function(ChannelName) {
394
+ if (ChannelName in this.broadcastChannels) {
395
+ this.broadcastChannels[ChannelName].close();
396
+ delete broadcastChannels[ChannelName];
397
+ }
398
+
399
+ }
400
+
401
+ BaseModule.prototype.settingsChanged = function() {
402
+ var callbackArray = this.onChangedCallbacks.slice();
403
+ for (var i = 0; i < callbackArray.length; i++) {
404
+ callbackArray[i]( this, MODULE_CHANGE.SETTINGS_CHANGED );
405
+ }
406
+ }
407
+
408
+ BaseModule.prototype.exportSettings = function() {
409
+ var settings = {};
410
+ settings.dialog = this.typeName;
411
+ settings.name = this.instanceName;
412
+ return settings;
413
+ }
414
+
415
+ BaseModule.prototype.importSettings = function(settings) {
416
+ if (settings.dialog == this.typeName) {
417
+ this.setName(settings.name);
418
+ return true;
419
+ }
420
+ return false;
421
+ }
422
+
423
+ BaseModule.prototype.publishChanges = function(annotations, eventType) {
424
+ for (var i = 0; i < this.eventNotifiers.length; i++) {
425
+ this.eventNotifiers[i].publish(this, eventType, annotations);
426
+ }
427
+ if (eventType === __webpack_require__("549c").EVENT_TYPE.SELECTED) {
428
+ if (annotations && annotations[0]) {
429
+ var annotation = annotations[0];
430
+ var data = {action: "query-data", resource: annotation.data.id, data: annotation.data, sender: this.instanceName};
431
+ for (var key in this.broadcastChannels) {
432
+ this.broadcastChannels[key].postMessage(data);
433
+ }
434
+ }
435
+ }
436
+ }
437
+
438
+ BaseModule.prototype.setMessageFunction = function(functionIn) {
439
+ this.messageFunction = functionIn;
440
+ }
441
+
442
+ BaseModule.prototype.displayMessage = function(message) {
443
+ if (this.messageFunction)
444
+ this.messageFunction(message);
445
+ }
446
+
447
+ BaseModule.prototype.getName = function() {
448
+ return this.instanceName;
449
+ }
450
+
451
+ BaseModule.prototype.destroy = function() {
452
+ //Make a temorary copy as the array may be altered during the loop
453
+ var callbackArray = this.onChangedCallbacks.slice();
454
+ for (var i = 0; i < callbackArray.length; i++) {
455
+ callbackArray[i]( this, MODULE_CHANGE.DESTROYED );
456
+ }
457
+
458
+ delete this;
459
+ }
460
+
461
+ BaseModule.prototype.addChangedCallback = function(callback) {
462
+ if (this.onChangedCallbacks.includes(callback) == false)
463
+ this.onChangedCallbacks.push(callback);
464
+ }
465
+
466
+ BaseModule.prototype.removeChangedCallback = function(callback) {
467
+ var index = this.onChangedCallbacks.indexOf(callback);
468
+ if (index > -1) {
469
+ this.onChangedCallbacks.splice(index, 1);
470
+ }
471
+ }
472
+
473
+ BaseModule.prototype.addNotifier = function(eventNotifier) {
474
+ this.eventNotifiers.push(eventNotifier);
475
+ }
476
+
477
+ exports.BaseModule = BaseModule;
478
+ exports.MODULE_CHANGE = MODULE_CHANGE;
479
+
480
+
481
+ /***/ }),
482
+
483
+ /***/ "429c":
484
+ /***/ (function(module, exports) {
485
+
486
+ module.exports = require("@abi-software/svg-sprite");
487
+
488
+ /***/ }),
489
+
490
+ /***/ "4914":
491
+ /***/ (function(module, exports) {
492
+
493
+ module.exports = require("element-ui/lib/color-picker");
494
+
495
+ /***/ }),
496
+
497
+ /***/ "4c89":
498
+ /***/ (function(module, exports) {
499
+
500
+ module.exports = require("element-ui/lib/theme-chalk/drawer.css");
501
+
502
+ /***/ }),
503
+
504
+ /***/ "4e2d":
505
+ /***/ (function(module, exports) {
506
+
507
+ module.exports = require("lodash/uniq");
508
+
509
+ /***/ }),
510
+
511
+ /***/ "4e8a":
512
+ /***/ (function(module, exports) {
513
+
514
+ module.exports = "precision highp float;\nuniform sampler2D myTex;\nvarying vec2 vUv;\n\nvoid main() {\n\tgl_FragColor = texture2D( myTex, vUv );\n\n}\n"
515
+
516
+ /***/ }),
517
+
518
+ /***/ "51c7":
519
+ /***/ (function(module, exports) {
520
+
521
+ module.exports = require("element-ui/lib/theme-chalk/header.css");
522
+
523
+ /***/ }),
524
+
525
+ /***/ "51e9":
526
+ /***/ (function(module, exports) {
527
+
528
+ module.exports = require("core-js/modules/es.symbol.description");
529
+
530
+ /***/ }),
531
+
532
+ /***/ "51f7":
533
+ /***/ (function(module, exports) {
534
+
535
+ module.exports = require("core-js/modules/es.regexp.exec");
536
+
537
+ /***/ }),
538
+
539
+ /***/ "549c":
540
+ /***/ (function(module, exports) {
541
+
542
+ var EVENT_TYPE = { ALL: 0, SELECTED: 1, HIGHLIGHTED: 2 };
543
+
544
+ var SelectionEvent = function(eventTypeIn, identifiersIn) {
545
+ this.eventType = eventTypeIn;
546
+ this.identifiers = identifiersIn;
547
+ }
548
+
549
+ var returnFullID = function(sourceId) {
550
+ //return full annotations with all different name
551
+ }
552
+
553
+ var Subscription = function(subscriberIn, callbackIn, eventType) {
554
+ this.targetedID = [];
555
+ var subscriber = subscriberIn;
556
+ if (eventType === undefined)
557
+ this.targetEventType = EVENT_TYPE.ALL;
558
+ else
559
+ this.targetEventType = eventType;
560
+ var callback = callbackIn;
561
+
562
+ var _this = this;
563
+
564
+ this.getEventType = function() {
565
+ return eventType;
566
+ }
567
+
568
+ this.notify = function(source, eventType, ids) {
569
+ if (source !== subscriber && (_this.targetEventType === EVENT_TYPE.ALL ||
570
+ _this.targetEventType === eventType)) {
571
+ //should support different type of id e.g lyph, name, fmas...
572
+ //need a function that finds all relavant ids
573
+ var event = new SelectionEvent(eventType, ids);
574
+ callback(event);
575
+ }
576
+ }
577
+ }
578
+
579
+ exports.EventNotifier = function() {
580
+ var events = [];
581
+ var subscriptions = [];
582
+ var _this = this;
583
+
584
+ this.publish = function(source, eventType, id) {
585
+ for (var i = 0; i < subscriptions.length;i++) {
586
+ subscriptions[i].notify(source, eventType, id);
587
+ }
588
+ }
589
+
590
+ this.subscribe = function(subscriber, callbackFunction, eventType) {
591
+ if (typeof callbackFunction === "function") {
592
+ var subscription = new Subscription(subscriber, callbackFunction, eventType);
593
+ subscriptions.push(subscription);
594
+ return subscription;
595
+ }
596
+ return undefined;
597
+ }
598
+
599
+ this.unsubscribe = function(subscription) {
600
+ for (var i = 0; i < subscriptions.length;i++) {
601
+ if (subscription === subscriptions[i]) {
602
+ subscriptions.splice(i, 1);
603
+ return;
604
+ }
605
+ }
606
+ }
607
+ }
608
+
609
+ exports.EVENT_TYPE = EVENT_TYPE;
610
+
611
+
612
+ /***/ }),
613
+
614
+ /***/ "55ee":
615
+ /***/ (function(module, exports) {
616
+
617
+ module.exports = require("element-ui/lib/theme-chalk/checkbox.css");
618
+
619
+ /***/ }),
620
+
621
+ /***/ "5810":
622
+ /***/ (function(module, exports, __webpack_require__) {
623
+
624
+ // extracted by mini-css-extract-plugin
625
+
626
+ /***/ }),
627
+
628
+ /***/ "5fef":
629
+ /***/ (function(module, exports) {
630
+
631
+ module.exports = require("core-js/modules/es.regexp.to-string");
632
+
633
+ /***/ }),
634
+
635
+ /***/ "6049":
636
+ /***/ (function(module, exports) {
637
+
638
+ module.exports = require("core-js/modules/es.symbol");
639
+
640
+ /***/ }),
641
+
642
+ /***/ "642d":
643
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
644
+
645
+ "use strict";
646
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_style_index_1_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7d9b");
647
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_style_index_1_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_style_index_1_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
648
+ /* unused harmony reexport * */
649
+
650
+
651
+ /***/ }),
652
+
653
+ /***/ "6579":
654
+ /***/ (function(module, exports) {
655
+
656
+ module.exports = require("core-js/modules/es.array.slice");
657
+
658
+ /***/ }),
659
+
660
+ /***/ "67b6":
661
+ /***/ (function(module, exports, __webpack_require__) {
662
+
663
+ var THREE = __webpack_require__("9206").THREE;
664
+ // Current model's associate data, data fields, external link, nerve map
665
+ // informations,
666
+ // these are proived in the organsFileMap array.
667
+ var OrgansSceneData = function() {
668
+ this.currentName = "";
669
+ this.currentSystem = "";
670
+ this.currentPart = "";
671
+ this.currentSpecies = "";
672
+ this.metaURL = "";
673
+ this.viewURL = "";
674
+ this.geometries = [];
675
+ this.lines = [];
676
+ this.glyphsets = [];
677
+ this.pointsets = [];
678
+ this.currentTime = 0.0;
679
+ this.timeVarying = false;
680
+ // Current model's associate data, data fields, external link, nerve map
681
+ // informations,
682
+ this.nerveMap = undefined;
683
+ this.nerveMapIsActive = false;
684
+ }
685
+
686
+ /**
687
+ * Viewer of 3D-organs models. Users can toggle on/off different views. Data is
688
+ * displayed instead if models are not available.
689
+ *
690
+ * @class
691
+ * @param {PJP.ModelsLoader}
692
+ * ModelsLoaderIn - defined in modelsLoade.js, providing locations of
693
+ * files.
694
+ * @param {String}
695
+ * PanelName - Id of the target element to create the
696
+ * {@link PJP.OrgansViewer} on.
697
+ * @author Alan Wu
698
+ * @returns {PJP.OrgansViewer}
699
+ */
700
+ var OrgansViewer = function(ModelsLoaderIn) {
701
+ (__webpack_require__("7a89").RendererModule).call(this);
702
+ var pickerScene = undefined;
703
+ var nerveMapScene = undefined;
704
+ this.sceneData = new OrgansSceneData();
705
+ var timeChangedCallbacks = new Array();
706
+ var sceneChangedCallbacks = new Array();
707
+ var organPartAddedCallbacks = new Array();
708
+ var finishDownloadCallback = undefined;
709
+ var layoutUpdateRequiredCallbacks = new Array();
710
+ var modelsLoader = ModelsLoaderIn;
711
+ var _this = this;
712
+ _this.typeName = "Organ Viewer";
713
+
714
+ this.getSceneData = function() {
715
+ return _this.sceneData;
716
+ }
717
+
718
+ /**
719
+ * Used to update internal timer in scene when time slider has changed.
720
+ */
721
+ this.updateTime = function(value) {
722
+ let duration = 6000;
723
+ if (_this.scene)
724
+ duration = _this.scene.getDuration();
725
+ var actualTime = value / 100.0 * duration;
726
+ if (!_this.sceneData.nerveMapIsActive) {
727
+ if (pickerScene)
728
+ pickerScene.setMorphsTime(actualTime);
729
+ if (_this.scene)
730
+ _this.scene.setMorphsTime(actualTime);
731
+ } else if (nerveMapScene) {
732
+ nerveMapScene.setMorphsTime(actualTime);
733
+ if (_this.sceneData.nerveMap && _this.sceneData.nerveMap.additionalReader)
734
+ _this.sceneData.nerveMap.additionalReader.setTime(value / 100.0);
735
+ }
736
+ _this.sceneData.currentTime = value;
737
+ }
738
+
739
+ /**
740
+ * Update the time slider and other renderers/scenes when time has changed.
741
+ */
742
+ var preRenderTimeUpdate = function() {
743
+ let duration = 3000;
744
+ if (_this.scene)
745
+ duration = _this.scene.getDuration();
746
+ var currentTime = _this.zincRenderer.getCurrentTime();
747
+ for (var i = 0; i < timeChangedCallbacks.length;i++) {
748
+ timeChangedCallbacks[i](currentTime);
749
+ }
750
+ if (!_this.sceneData.nerveMapIsActive && pickerScene)
751
+ pickerScene.setMorphsTime(currentTime);
752
+ if (_this.sceneData.nerveMap && _this.sceneData.nerveMap.additionalReader)
753
+ _this.sceneData.nerveMap.additionalReader.setTime(currentTime /
754
+ duration);
755
+ _this.sceneData.currentTime = currentTime / duration * 100.0;
756
+ }
757
+
758
+ var postRenderSelectedCoordinatesUpdate = function() {
759
+ if (_this.selectedCenter) {
760
+ const vector = new THREE.Vector3();
761
+ vector.copy(_this.selectedCenter);
762
+ var coord = _this.scene.vectorToScreenXY(vector);
763
+ _this.selectedScreenCoordinates.x = coord.x;
764
+ _this.selectedScreenCoordinates.y = coord.y;
765
+ }
766
+ }
767
+
768
+ var preRenderUpdateCallback = function() {
769
+ return function() {
770
+ preRenderTimeUpdate();
771
+ }
772
+ }
773
+
774
+ var postRenderUpdateCallback = function() {
775
+ return function() {
776
+ postRenderSelectedCoordinatesUpdate();
777
+ }
778
+ }
779
+
780
+ /**
781
+ * Add a callback which will be called when time has changed
782
+ */
783
+ this.addTimeChangedCallback = function(callback) {
784
+ if (typeof(callback === "function"))
785
+ timeChangedCallbacks.push(callback);
786
+ }
787
+
788
+ this.setTexturePos = function(value) {
789
+ if (_this.sceneData.nerveMap && _this.sceneData.nerveMap.additionalReader)
790
+ _this.sceneData.nerveMap.additionalReader.setSliderPos(value);
791
+ }
792
+
793
+ this.addLayoutUpdateRequiredCallback = function(callback) {
794
+ if (typeof(callback === "function")) {
795
+ layoutUpdateRequiredCallbacks.push(callback);
796
+ }
797
+ }
798
+
799
+ this.addSceneChangedCallback = function(callback) {
800
+ if (typeof(callback === "function")) {
801
+ sceneChangedCallbacks.push(callback);
802
+ }
803
+ }
804
+
805
+ this.addOrganPartAddedCallback = function(callback) {
806
+ if (typeof(callback === "function"))
807
+ organPartAddedCallbacks.push(callback);
808
+ }
809
+
810
+ this.setFinishDownloadCallback = function(callback) {
811
+ if (typeof(callback === "function"))
812
+ finishDownloadCallback = callback;
813
+ }
814
+
815
+ this.unsetFinishDownloadCallback = function() {
816
+ finishDownloadCallback = undefined;
817
+ }
818
+
819
+ this.getNamedObjectsToScreenCoordinates = function(name, camera) {
820
+ var vector = new THREE.Vector3();
821
+ vector.setFromMatrixPosition( obj.matrixWorld );
822
+ var widthHalf = (width/2);
823
+ var heightHalf = (height/2);
824
+ vector.project(camera);
825
+ vector.x = ( vector.x * widthHalf ) + widthHalf;
826
+ vector.y = - ( vector.y * heightHalf ) + heightHalf;
827
+ return vector;
828
+ }
829
+
830
+ var getIdObjectFromIntersect = function(intersected) {
831
+ var id = undefined;
832
+ var intersectedObject = undefined;
833
+ if (intersected !== undefined) {
834
+ if (intersected.object.userData &&
835
+ intersected.object.userData.isMarker) {
836
+ intersectedObject = intersected.object.userData.parent.morph;
837
+ } else {
838
+ intersectedObject = intersected.object;
839
+ }
840
+ if (intersectedObject) {
841
+ if (intersectedObject.name) {
842
+ id = intersectedObject.name;
843
+ } else {
844
+ var annotations = _this.getAnnotationsFromObjects(
845
+ [intersectedObject]);
846
+ if (annotations && annotations[0]) {
847
+ id = annotations[0].data.group;
848
+ }
849
+ }
850
+ }
851
+ }
852
+ return {"id":id, "object":intersectedObject};
853
+ }
854
+
855
+ /**
856
+ * Callback function when a pickable object has been picked. It will then
857
+ * call functions in tissueViewer and cellPanel to show corresponding
858
+ * informations.
859
+ *
860
+ * @callback
861
+ */
862
+ var _pickingCallback = function() {
863
+ return function(intersects, window_x, window_y) {
864
+ var intersected = _this.getIntersectedObject(intersects);
865
+ var idObject = getIdObjectFromIntersect(intersected);
866
+ if (idObject.id) {
867
+ if (_this.toolTip !== undefined) {
868
+ _this.toolTip.setText(idObject.id);
869
+ _this.toolTip.show(window_x, window_y);
870
+ }
871
+ _this.displayMessage(idObject.object.name + " selected.");
872
+
873
+ if (idObject.object.userData.isGlyph) {
874
+ if (idObject.object.name)
875
+ _this.setSelectedByObjects([idObject.object], true);
876
+ else
877
+ _this.setSelectedByZincObject(idObject.object.userData.getGlyphset(), true);
878
+ } else {
879
+ _this.setSelectedByObjects([idObject.object], true);
880
+ }
881
+ return;
882
+ } else {
883
+ if (_this.toolTip !== undefined) {
884
+ _this.toolTip.hide();
885
+ }
886
+ _this.setSelectedByObjects([], true);
887
+ }
888
+ }
889
+ };
890
+
891
+ /**
892
+ * Callback function when a pickable object has been hovered over. It will
893
+ * show objecty id/name as _this.toolTip text.
894
+ *
895
+ * @callback
896
+ */
897
+ var _hoverCallback = function() {
898
+ return function(intersects, window_x, window_y) {
899
+ var intersected = _this.getIntersectedObject(intersects);
900
+ var idObject = getIdObjectFromIntersect(intersected);
901
+ if (idObject.id) {
902
+ _this.displayArea.style.cursor = "pointer";
903
+ if (_this.toolTip !== undefined) {
904
+ _this.toolTip.setText(idObject.id);
905
+ _this.toolTip.show(window_x, window_y);
906
+ }
907
+ _this.setHighlightedByObjects([idObject.object], true);
908
+ return;
909
+ }
910
+ else {
911
+ if (_this.toolTip !== undefined) {
912
+ _this.toolTip.hide();
913
+ }
914
+ _this.displayArea.style.cursor = "auto";
915
+ _this.setHighlightedByObjects([], true);
916
+ }
917
+ }
918
+ };
919
+
920
+ var changeOrganPartsVisibilityForScene = function(scene, name, value, type) {
921
+ if (type == "all" || type == "geometries") {
922
+ var geometries = scene.findGeometriesWithGroupName(name);
923
+ for (var i = 0; i < geometries.length; i ++ ) {
924
+ geometries[i].setVisibility(value);
925
+ }
926
+ }
927
+ if (type == "all" || type == "glyphsets") {
928
+ var glyphsets = scene.findGlyphsetsWithGroupName(name);
929
+ for (var i = 0; i < glyphsets.length; i ++ ) {
930
+ glyphsets[i].setVisibility(value);
931
+ }
932
+ }
933
+ if (type == "all" || type == "pointsets") {
934
+ var pointsets = scene.findPointsetsWithGroupName(name);
935
+ for (var i = 0; i < pointsets.length; i ++ ) {
936
+ pointsets[i].setVisibility(value);
937
+ }
938
+ }
939
+ if (type == "all" || type == "lines") {
940
+ var lines = scene.findLinesWithGroupName(name);
941
+ for (var i = 0; i < lines.length; i ++ ) {
942
+ lines[i].setVisibility(value);
943
+ }
944
+ }
945
+ }
946
+
947
+ /**
948
+ * Change visibility for parts of the current scene.
949
+ */
950
+ this.changeGeometriesVisibility = function(name, value) {
951
+ changeOrganPartsVisibilityForScene(_this.scene, name, value, 'geometries');
952
+ if (pickerScene)
953
+ changeOrganPartsVisibilityForScene(pickerScene, name, value, 'geometries');
954
+ }
955
+
956
+ /**
957
+ * Change visibility for parts of the current scene.
958
+ */
959
+ this.changeGlyphsetsVisibility = function(name, value) {
960
+ changeOrganPartsVisibilityForScene(_this.scene, name, value, 'glyphsets');
961
+ if (pickerScene)
962
+ changeOrganPartsVisibilityForScene(pickerScene, name, value, 'glyphsets');
963
+ }
964
+
965
+ /**
966
+ * Change visibility for parts of the current scene.
967
+ */
968
+ this.changeLinesVisibility = function(name, value) {
969
+ changeOrganPartsVisibilityForScene(_this.scene, name, value, 'lines');
970
+ if (pickerScene)
971
+ changeOrganPartsVisibilityForScene(pickerScene, name, value, 'lines');
972
+ }
973
+
974
+ /**
975
+ * Change visibility for parts of the current scene.
976
+ */
977
+ this.changePointsetsVisibility = function(name, value) {
978
+ changeOrganPartsVisibilityForScene(_this.scene, name, value, 'pointsets');
979
+ if (pickerScene)
980
+ changeOrganPartsVisibilityForScene(pickerScene, name, value, 'pointsets');
981
+ }
982
+
983
+ /**
984
+ * Change visibility for parts of the current scene.
985
+ */
986
+ this.changeOrganPartsVisibility = function(name, value, typeIn) {
987
+ var type = "all";
988
+ if (typeIn !== undefined)
989
+ type = typeIn;
990
+ changeOrganPartsVisibilityForScene(_this.scene, name, value, type);
991
+ if (pickerScene)
992
+ changeOrganPartsVisibilityForScene(pickerScene, name, value, type);
993
+ }
994
+
995
+ this.changeOrganPartsVisibilityCallback = function(name) {
996
+ return function(value) {
997
+ _this.changeOrganPartsVisibility(name, value);
998
+ }
999
+ }
1000
+
1001
+ /**
1002
+ * Change some of the ZincGeometry property for never map geometry
1003
+ *
1004
+ * @callback
1005
+ */
1006
+ var _addNerveMapGeometryCallback = function(GroupName) {
1007
+ return function(geometry) {
1008
+ geometry.groupName = GroupName;
1009
+ if (imageCombiner && geometry.morph && geometry.morph.material.map) {
1010
+ geometry.morph.material.map = new THREE.Texture(imageCombiner.getCombinedImage());
1011
+ geometry.morph.material.map.needsUpdate = true;
1012
+ geometry.morph.material.needsUpdate = true;
1013
+ }
1014
+ }
1015
+ }
1016
+
1017
+ /**
1018
+ * Read in the nerve map models onto the primary renderer when nerve map has
1019
+ * been toggled on.
1020
+ */
1021
+ var setupNerveMapPrimaryRenderer = function() {
1022
+ var sceneName = _this.sceneData.currentName + "_nervemap";
1023
+ nerveMapScene = _this.zincRenderer.getSceneByName(sceneName);
1024
+ if (nerveMapScene == undefined) {
1025
+ var downloadPath = modelsLoader.getOrgansDirectoryPrefix() + "/" + _this.sceneData.nerveMap.threed.meta;
1026
+ nerveMapScene = _this.zincRenderer.createScene(sceneName);
1027
+ nerveMapScene.loadMetadataURL(downloadPath, _addNerveMapGeometryCallback("threed"));
1028
+ if (_this.sceneData.nerveMap.threed.view !== undefined)
1029
+ nerveMapScene.loadViewURL(modelsLoader.getOrgansDirectoryPrefix() + "/" + _this.sceneData.nerveMap.threed.view);
1030
+ else {
1031
+ nerveMapScene.loadViewURL(modelsLoader.getBodyDirectoryPrefix() + "/body_view.json");
1032
+ }
1033
+ nerveMapScene.ambient.intensity = 8.0;
1034
+ nerveMapScene.directionalLight.intensity = 0;
1035
+ var zincCameraControl = nerveMapScene.getZincCameraControls();
1036
+ zincCameraControl.setMouseButtonAction("AUXILIARY", "ZOOM");
1037
+ zincCameraControl.setMouseButtonAction("SECONDARY", "PAN");
1038
+ _this.sceneData.nerveMap.additionalReader = new (__webpack_require__("6fd2").VaryingTexCoordsReader)(nerveMapScene);
1039
+ var urlsArray = [ modelsLoader.getOrgansDirectoryPrefix() + "/digestive/stomach/nerve_map/3d/xi1_time_0.json",
1040
+ modelsLoader.getOrgansDirectoryPrefix() + "/digestive/stomach/nerve_map/3d/xi1_time_1.json",
1041
+ modelsLoader.getOrgansDirectoryPrefix() + "/digestive/stomach/nerve_map/3d/xi0_time_0.json"];
1042
+ _this.sceneData.nerveMap.additionalReader.loadURLsIntoBufferGeometry(urlsArray);
1043
+ }
1044
+ _this.zincRenderer.setCurrentScene(nerveMapScene);
1045
+ _this.graphicsHighlight.reset();
1046
+ }
1047
+
1048
+ var activateAdditionalNerveMapRenderer = function() {
1049
+ for (var i = 0; i < layoutUpdateRequiredCallbacks.length;i++) {
1050
+ layoutUpdateRequiredCallbacks[i](false, true);
1051
+ }
1052
+ }
1053
+
1054
+ /**
1055
+ * Nerve map has been toggled on/off, change organs renderer layput.
1056
+ */
1057
+ this.changeNerveMapVisibility = function() {
1058
+ _this.sceneData.nerveMapIsActive = !_this.sceneData.nerveMapIsActive;
1059
+ if (_this.sceneData.nerveMapIsActive)
1060
+ setupNerveMapPrimaryRenderer();
1061
+ else {
1062
+ _this.zincRenderer.setCurrentScene(_this.scene);
1063
+ _this.graphicsHighlight.reset();
1064
+ }
1065
+ activateAdditionalNerveMapRenderer();
1066
+ }
1067
+
1068
+ this.changeBackgroundColour = function(backgroundColourString) {
1069
+ var colour = new THREE.Color(backgroundColourString);
1070
+ if (_this.zincRenderer) {
1071
+ var internalRenderer = _this.zincRenderer.getThreeJSRenderer();
1072
+ internalRenderer.setClearColor( colour, 1 );
1073
+ }
1074
+ }
1075
+
1076
+ var addOrganPartToSceneData = function(zincObject) {
1077
+ if (zincObject.groupName) {
1078
+ if (zincObject.isGeometry) {
1079
+ if (!_this.sceneData.geometries.includes(zincObject.groupName)) {
1080
+ _this.sceneData.geometries.push(zincObject.groupName);
1081
+ }
1082
+ } else if (zincObject.isGlyphset) {
1083
+ if (!_this.sceneData.glyphsets.includes(zincObject.groupName)) {
1084
+ _this.sceneData.glyphsets.push(zincObject.groupName);
1085
+ }
1086
+ } else if (zincObject.isLines) {
1087
+ if (!_this.sceneData.lines.includes(zincObject.groupName)) {
1088
+ _this.sceneData.lines.push(zincObject.groupName);
1089
+ }
1090
+ } else if (zincObject.isPointset) {
1091
+ if (!_this.sceneData.pointsets.includes(zincObject.groupName)) {
1092
+ _this.sceneData.pointsets.push(zincObject.groupName);
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+
1098
+ var addOrganPart = function(systemName, partName, useDefautColour, zincObject) {
1099
+ for (var i = 0; i < organPartAddedCallbacks.length;i++) {
1100
+ organPartAddedCallbacks[i](zincObject.groupName, _this.scene.isTimeVarying(), zincObject);
1101
+ }
1102
+ if (useDefautColour)
1103
+ modelsLoader.setGeometryColour(zincObject, systemName, partName);
1104
+ addOrganPartToSceneData(zincObject);
1105
+ if (zincObject.groupName) {
1106
+ _this.displayMessage(zincObject.groupName + " loaded.");
1107
+ } else {
1108
+ _this.displayMessage("Resource loaded.");
1109
+ }
1110
+ var annotation = new (__webpack_require__("a0d7").annotation)();
1111
+ annotation.data = {species:_this.sceneData.currentSpecies, system:systemName, part:partName, group:zincObject.groupName};
1112
+ zincObject.userData = [annotation];
1113
+ }
1114
+
1115
+ /**
1116
+ * New organs geometry has been added to the scene, add UIs and make
1117
+ * sure the viewport is correct.
1118
+ */
1119
+ var _addOrganPartCallback = function(systemName, partName, useDefautColour) {
1120
+ return function(zincObject) {
1121
+ addOrganPart(systemName, partName, useDefautColour, zincObject);
1122
+ }
1123
+ }
1124
+
1125
+ var downloadCompletedCallback = function() {
1126
+ return function() {
1127
+ _this.settingsChanged();
1128
+ _this.sceneData.timeVarying = _this.scene.isTimeVarying();
1129
+ _this.displayMessage("All resources loaded.");
1130
+ if (finishDownloadCallback)
1131
+ finishDownloadCallback();
1132
+ }
1133
+ }
1134
+
1135
+ var singleItemDownloadCompletedCallback = function(systemName, partName, useDefautColour) {
1136
+ return function(geometry) {
1137
+ addOrganPart(systemName, partName, useDefautColour, geometry);
1138
+ _this.settingsChanged();
1139
+ }
1140
+ }
1141
+
1142
+ /**
1143
+ * Toggle data field displays. Data fields displays flow/pressure and <button @click="play">Play</button>
1144
+ * other activities of the organs.
1145
+ */
1146
+ this.updateFieldvisibility = function(dataFields, value) {
1147
+ for ( var i = 0; i < dataFields.length; i ++ ) {
1148
+ if (value != i) {
1149
+ var geometryName = dataFields[i].PartName;
1150
+ _this.changeOrganPartsVisibility(geometryName, false);
1151
+ }
1152
+ }
1153
+ if (value > -1) {
1154
+ var partName = dataFields[value].PartName;
1155
+ if ((_this.scene.findGeometriesWithGroupName(partName).length > 0) ||
1156
+ (_this.scene.findGlyphsetsWithGroupName(partName).length > 0)) {
1157
+ _this.changeOrganPartsVisibility(partName, true);
1158
+ } else {
1159
+ var partDetails = getOrganDetails(dataFields[value].SystemName, partName);
1160
+ if (partDetails != undefined) {
1161
+ _this.scene.loadMetadataURL(modelsLoader.getOrgansDirectoryPrefix() + "/" + partDetails.meta);
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+
1167
+ /**
1168
+ * Return an array containing name(s) of species that also contains the
1169
+ * currently displayed organs.
1170
+ *
1171
+ * @returns {Array} containing species name
1172
+ */
1173
+ this.getAvailableSpecies = function(currentSpecies, currentSystem, currentPart) {
1174
+ var availableSpecies = new Array();
1175
+ availableSpecies.push("none");
1176
+ var keysArray = Object.keys(organsFileMap);
1177
+ for (index in keysArray) {
1178
+ var species = keysArray[index];
1179
+ if (species != currentSpecies) {
1180
+ if (organsFileMap[species].hasOwnProperty(currentSystem) &&
1181
+ organsFileMap[species][currentSystem].hasOwnProperty(currentPart)) {
1182
+ availableSpecies.push(species);
1183
+ }
1184
+ }
1185
+ }
1186
+ return availableSpecies;
1187
+ }
1188
+
1189
+ var setSceneData = function(speciesName, systemName, partName, organsDetails) {
1190
+ _this.sceneData.nerveMapIsActive = false;
1191
+ _this.sceneData.nerveMap = undefined;
1192
+ _this.sceneData.metaURL = "";
1193
+ _this.sceneData.viewURL = "";
1194
+ _this.sceneData.currentSpecies = speciesName;
1195
+ _this.sceneData.currentSystem = systemName;
1196
+ _this.sceneData.currentPart = partName;
1197
+ _this.sceneData.currentTime = 0.0;
1198
+ _this.sceneData.geometries.splice(0);
1199
+ _this.sceneData.lines.splice(0);
1200
+ _this.sceneData.glyphsets.splice(0);
1201
+ _this.sceneData.pointsets.splice(0);
1202
+ _this.sceneData.timeVarying = false;
1203
+ // This is used as title
1204
+ var name = "";
1205
+ if (speciesName)
1206
+ name = speciesName + "/";
1207
+ if (systemName)
1208
+ name = systemName + "/";
1209
+ if (partName)
1210
+ name = partName;
1211
+ _this.sceneData.currentName = name;
1212
+ }
1213
+
1214
+ this.loadOrgansFromURL = function(url, speciesName, systemName, partName, viewURL) {
1215
+ if (_this.zincRenderer) {
1216
+ if (partName && (_this.sceneData.metaURL !== url)) {
1217
+ setSceneData(speciesName, systemName, partName, undefined);
1218
+ var name = _this.sceneData.currentName;
1219
+ var organScene = _this.zincRenderer.getSceneByName(name);
1220
+ if (organScene) {
1221
+ organScene.clearAll();
1222
+ } else {
1223
+ organScene = _this.zincRenderer.createScene(name);
1224
+ }
1225
+ for (var i = 0; i < sceneChangedCallbacks.length;i++) {
1226
+ sceneChangedCallbacks[i](_this.sceneData);
1227
+ }
1228
+ if (viewURL && viewURL != "") {
1229
+ _this.sceneData.viewURL = viewURL;
1230
+ organScene.loadViewURL(_this.sceneData.viewURL);
1231
+ } else
1232
+ _this.sceneData.viewURL = undefined;
1233
+ _this.sceneData.metaURL = url;
1234
+ _this.displayMessage("Downloading...");
1235
+ organScene.loadMetadataURL(url, _addOrganPartCallback(systemName, partName, false),
1236
+ downloadCompletedCallback());
1237
+ _this.scene = organScene;
1238
+ _this.zincRenderer.setCurrentScene(organScene);
1239
+ _this.graphicsHighlight.reset();
1240
+ var zincCameraControl = organScene.getZincCameraControls();
1241
+ zincCameraControl.enableRaycaster(organScene, _pickingCallback(), _hoverCallback());
1242
+ zincCameraControl.setMouseButtonAction("AUXILIARY", "ZOOM");
1243
+ zincCameraControl.setMouseButtonAction("SECONDARY", "PAN");
1244
+ }
1245
+ }
1246
+ }
1247
+
1248
+ this.alignCameraWithSelectedObject = function(transitionTime) {
1249
+ var objects = _this.graphicsHighlight.getSelected();
1250
+ if (objects && objects[0] && objects[0].userData) {
1251
+ _this.scene.alignObjectToCameraView(objects[0].userData, transitionTime);
1252
+ }
1253
+ }
1254
+
1255
+ this.exportSettings = function() {
1256
+ var settings = {};
1257
+ settings.name = _this.instanceName;
1258
+ if (_this.sceneData.currentSystem)
1259
+ settings.system = _this.sceneData.currentSystem;
1260
+ if (_this.sceneData.currentSpecies)
1261
+ settings.species = _this.sceneData.currentSpecies;
1262
+ if (_this.sceneData.currentPart)
1263
+ settings.part = _this.sceneData.currentPart;
1264
+ settings.metaURL = _this.sceneData.metaURL;
1265
+ if (_this.sceneData.viewURL)
1266
+ settings.viewURL = _this.sceneData.viewURL;
1267
+ settings.dialog = "Organ Viewer";
1268
+ return settings;
1269
+ }
1270
+
1271
+ this.importSettings = function(settings) {
1272
+ if (settings && (settings.dialog == this.typeName)) {
1273
+ _this.setName(settings.name);
1274
+ if (settings.metaURL !== undefined && settings.metaURL != "") {
1275
+ _this.loadOrgansFromURL(settings.metaURL, settings.species,
1276
+ settings.system, settings.part, settings.viewURL);
1277
+ } else {
1278
+ _this.loadOrgans(settings.species, settings.system, settings.part);
1279
+ }
1280
+ return true;
1281
+ }
1282
+ return false;
1283
+ }
1284
+
1285
+ /**
1286
+ * initialise loading of the html layout for the organs panel, this is
1287
+ * called when the {@link PJP.OrgansViewer} is created.
1288
+ *
1289
+ * @async
1290
+ */
1291
+ var initialise = function() {
1292
+ _this.initialiseRenderer(undefined);
1293
+ if (_this.zincRenderer) {
1294
+ _this.zincRenderer.addPreRenderCallbackFunction(preRenderUpdateCallback());
1295
+ _this.zincRenderer.addPostRenderCallbackFunction(postRenderUpdateCallback());
1296
+ }
1297
+ }
1298
+
1299
+ initialise();
1300
+
1301
+ }
1302
+
1303
+ OrgansViewer.prototype = Object.create((__webpack_require__("7a89").RendererModule).prototype);
1304
+ exports.OrgansViewer = OrgansViewer;
1305
+
1306
+
1307
+ /***/ }),
1308
+
1309
+ /***/ "6814":
1310
+ /***/ (function(module, exports) {
1311
+
1312
+ module.exports = require("lodash/orderBy");
1313
+
1314
+ /***/ }),
1315
+
1316
+ /***/ "6bb1":
1317
+ /***/ (function(module, exports) {
1318
+
1319
+ module.exports = require("core-js/modules/es.array.index-of");
1320
+
1321
+ /***/ }),
1322
+
1323
+ /***/ "6bfd":
1324
+ /***/ (function(module, exports) {
1325
+
1326
+ module.exports = require("element-ui/lib/locale/lang/en");
1327
+
1328
+ /***/ }),
1329
+
1330
+ /***/ "6ea3":
1331
+ /***/ (function(module, exports) {
1332
+
1333
+ module.exports = require("element-ui/lib/row");
1334
+
1335
+ /***/ }),
1336
+
1337
+ /***/ "6fd2":
1338
+ /***/ (function(module, exports, __webpack_require__) {
1339
+
1340
+ var THREE = __webpack_require__("9206").THREE;
1341
+
1342
+ exports.VaryingTexCoordsReader = function(sceneIn) {
1343
+
1344
+ var _this = this;
1345
+ var finishCallbackFunction = undefined;
1346
+ var bufferGeometry = undefined;
1347
+ var zincGeometry = undefined;
1348
+ var numberOfInputs = 0;
1349
+ var completedInputs = 0;
1350
+ var scene = sceneIn;
1351
+ var currentMap = undefined;
1352
+ var textureLoader = new THREE.TextureLoader();
1353
+ var texture = new textureLoader.load( 'models/organsViewerModels/digestive/stomach/nerve_map/texture/ratstomach_innervation_square.png' );
1354
+ texture.wrapS = THREE.RepeatWrapping;
1355
+ texture.wrapT = THREE.RepeatWrapping;
1356
+ texture.format = THREE.RGBFormat;
1357
+
1358
+ var shadersUniforms = THREE.UniformsUtils.merge( [
1359
+ {
1360
+ ambient : { type: "c", value: new THREE.Color( 0x000000 ) },
1361
+ diffuse : { type: "c", value: new THREE.Color( 0xffffff ) },
1362
+ emissive : { type: "c", value: new THREE.Color( 0xbbbbbb ) },
1363
+ specular : { type: "c", value: new THREE.Color( 0x111111 ) },
1364
+ shininess: { type: "f", value: 100 },
1365
+ opacity: { type: "f", value: 1.0 },
1366
+ ambientLightColor: { type: "c", value: new THREE.Color( 0xF0F0F0 ) },
1367
+ directionalLightColor: { type: "c", value: new THREE.Color( 0x555555) },
1368
+ directionalLightDirection: { type: "v3", value: new THREE.Vector3() },
1369
+ offsetRepeat: { value: new THREE.Vector4( 0, 0, 1, 1 ) },
1370
+ time: { type: "f", value: 0.0 },
1371
+ slide_pos: { type: "f", value: 1.0 },
1372
+ myTex: {type: 't', value: null}
1373
+ } ] );
1374
+
1375
+ var addGeometryIntoBufferGeometry = function(order, geometry)
1376
+ {
1377
+ var arrayLength = geometry.faces.length * 3 * 3;
1378
+ var positions = new Float32Array( arrayLength );
1379
+ var colors = new Float32Array( arrayLength );
1380
+ var normals = new Float32Array( arrayLength );
1381
+ var texCoords = new Float32Array( geometry.faces.length * 3 * 2 );
1382
+ if (bufferGeometry === undefined)
1383
+ bufferGeometry = new THREE.BufferGeometry();
1384
+
1385
+ geometry.faces.forEach( function ( face, index ) {
1386
+ positions[ index * 9 + 0 ] = geometry.vertices[ face.a ].x;
1387
+ positions[ index * 9 + 1 ] = geometry.vertices[ face.a ].y;
1388
+ positions[ index * 9 + 2 ] = geometry.vertices[ face.a ].z;
1389
+ positions[ index * 9 + 3 ] = geometry.vertices[ face.b ].x;
1390
+ positions[ index * 9 + 4 ] = geometry.vertices[ face.b ].y;
1391
+ positions[ index * 9 + 5 ] = geometry.vertices[ face.b ].z;
1392
+ positions[ index * 9 + 6 ] = geometry.vertices[ face.c ].x;
1393
+ positions[ index * 9 + 7 ] = geometry.vertices[ face.c ].y;
1394
+ positions[ index * 9 + 8 ] = geometry.vertices[ face.c ].z;
1395
+
1396
+ normals[ index * 9 + 0 ] = face.vertexNormals[0].x;
1397
+ normals[ index * 9 + 1 ] = face.vertexNormals[0].y;
1398
+ normals[ index * 9 + 2 ] = face.vertexNormals[0].z;
1399
+ normals[ index * 9 + 3 ] = face.vertexNormals[1].x;
1400
+ normals[ index * 9 + 4 ] = face.vertexNormals[1].y;
1401
+ normals[ index * 9 + 5 ] = face.vertexNormals[1].z;
1402
+ normals[ index * 9 + 6 ] = face.vertexNormals[2].x;
1403
+ normals[ index * 9 + 7 ] = face.vertexNormals[2].y;
1404
+ normals[ index * 9 + 8 ] = face.vertexNormals[2].z;
1405
+
1406
+ texCoords[ index * 6 + 0] = geometry.faceVertexUvs[ 0 ][index][0].x;
1407
+ texCoords[ index * 6 + 1] = geometry.faceVertexUvs[ 0 ][index][0].y;
1408
+ texCoords[ index * 6 + 2] = geometry.faceVertexUvs[ 0 ][index][1].x;
1409
+ texCoords[ index * 6 + 3] = geometry.faceVertexUvs[ 0 ][index][1].y;
1410
+ texCoords[ index * 6 + 4] = geometry.faceVertexUvs[ 0 ][index][2].x;
1411
+ texCoords[ index * 6 + 5] = geometry.faceVertexUvs[ 0 ][index][2].y;
1412
+ } );
1413
+
1414
+
1415
+ if (order == 0) {
1416
+ bufferGeometry.addAttribute( "position", new THREE.BufferAttribute( positions, 3) );
1417
+ bufferGeometry.addAttribute( "normal", new THREE.BufferAttribute( normals, 3 ) );
1418
+ bufferGeometry.addAttribute( "uv", new THREE.BufferAttribute( texCoords, 2 ) );
1419
+ } else {
1420
+ var positionStr = "position_" + order;
1421
+ var normalStr = "normal_" + order;
1422
+ var uvsStr = "uv_" + order;
1423
+ bufferGeometry.addAttribute( positionStr, new THREE.BufferAttribute( positions, 3) );
1424
+ bufferGeometry.addAttribute( normalStr, new THREE.BufferAttribute( normals, 3 ) );
1425
+ bufferGeometry.addAttribute( uvsStr, new THREE.BufferAttribute( texCoords, 2 ) );
1426
+ }
1427
+
1428
+ }
1429
+
1430
+ var meshReady = function(bufferGeometryIn, shaderText, material){
1431
+ var shaderMaterial = new THREE.RawShaderMaterial( {
1432
+ vertexShader: shaderText[0],
1433
+ fragmentShader: shaderText[1],
1434
+ uniforms: shadersUniforms
1435
+ } );
1436
+ shaderMaterial.uniforms.myTex.value = texture;
1437
+ shaderMaterial.side = THREE.DoubleSide;
1438
+ shaderMaterial.depthTest = true;
1439
+ shaderMaterial.needsUpdate = true;
1440
+ shaderMaterial.map = texture;
1441
+ shaderMaterial.uniforms.myTex.value.needsUpdate = true;
1442
+ shaderMaterial.opacity = 1.0;
1443
+ zincGeometry = scene.addZincGeometry(bufferGeometryIn, 30001, undefined, undefined, false, false, true, undefined, shaderMaterial);
1444
+ zincGeometry.groupName = "varyingTexture";
1445
+ }
1446
+
1447
+ var myLoader = function(order, shaderText) {
1448
+ return function(geometry, materials){
1449
+ var material = 0;
1450
+ addGeometryIntoBufferGeometry(order, geometry);
1451
+ completedInputs++;
1452
+ if (completedInputs == numberOfInputs) {
1453
+ meshReady(bufferGeometry, shaderText, material);
1454
+ if (finishCallbackFunction != undefined && (typeof finishCallbackFunction == 'function'))
1455
+ finishCallbackFunction(bufferGeometry);
1456
+ }
1457
+ }
1458
+ }
1459
+
1460
+ this.setSliderPos = function(pos) {
1461
+ if (zincGeometry)
1462
+ zincGeometry.morph.material.uniforms.slide_pos.value = pos;
1463
+ }
1464
+
1465
+ this.setTime = function(time) {
1466
+ if (zincGeometry) {
1467
+ zincGeometry.morph.material.uniforms.time.value = time;
1468
+ }
1469
+ }
1470
+
1471
+ this.setTexture = function(textureIn) {
1472
+ if (zincGeometry) {
1473
+ zincGeometry.morph.material.uniforms.myTex.value = textureIn;
1474
+ zincGeometry.morph.material.uniforms.myTex.value.needsUpdate = true;
1475
+ }
1476
+ }
1477
+
1478
+ this.loadURLsIntoBufferGeometry = function(urls, finishCallback, progressCallback, errorCallback) {
1479
+ var loader = new THREE.JSONLoader( true );
1480
+ numberOfInputs = urls.length;
1481
+ finishCallbackFunction = finishCallback;
1482
+ var shaderText = [
1483
+ __webpack_require__("1823"),
1484
+ __webpack_require__("4e8a")
1485
+ ];
1486
+ for (var i = 0; i < numberOfInputs; i++)
1487
+ loader.load( urls[i], myLoader(i, shaderText), progressCallback, errorCallback);
1488
+ }
1489
+ }
1490
+
1491
+
1492
+ /***/ }),
1493
+
1494
+ /***/ "703d":
1495
+ /***/ (function(module, exports) {
1496
+
1497
+ module.exports = require("element-ui/lib/theme-chalk/col.css");
1498
+
1499
+ /***/ }),
1500
+
1501
+ /***/ "73ef":
1502
+ /***/ (function(module, exports) {
1503
+
1504
+ module.exports = require("element-ui/lib/theme-chalk/main.css");
1505
+
1506
+ /***/ }),
1507
+
1508
+ /***/ "76bf":
1509
+ /***/ (function(module, exports, __webpack_require__) {
1510
+
1511
+ __webpack_require__("b723");
1512
+
1513
+ exports.ToolTip = function(container) {
1514
+ var tooltipcontainerElement = undefined;
1515
+ var tipElement = undefined;
1516
+ var tiptextElement = undefined;
1517
+ var template = '<div class="mptooltip" id="tip"><span class="mptooltiptext" id="tiptext"> Tooltip text</span></div>';
1518
+ var _this = this;
1519
+
1520
+ /**
1521
+ * Show tool tip on the specified windows coordinates.
1522
+ * @param {Number} x - Style sheet with the same title.
1523
+ * @param {Number} y - selector string to match.
1524
+ */
1525
+ this.show = function(x, y) {
1526
+ tooltipcontainerElement.style.left = x +"px";
1527
+ tooltipcontainerElement.style.top = (y - 20) + "px";
1528
+ tipElement.style.visibility = "visible";
1529
+ tipElement.style.opacity = 1;
1530
+ tiptextElement.style.visibility = "visible";
1531
+ tiptextElement.style.opacity = 1;
1532
+ }
1533
+
1534
+ this.hide = function() {
1535
+ tipElement.style.visibility = "hidden";
1536
+ tipElement.style.opacity = 0;
1537
+ tiptextElement.style.visibility = "hidden";
1538
+ tiptextElement.style.opacity = 0;
1539
+ }
1540
+
1541
+ /**
1542
+ * Change the tooltip text.
1543
+ * @param {String} text - Text to update the tooltip to.
1544
+ */
1545
+ this.setText = function(text) {
1546
+ tiptextElement.innerHTML = text;
1547
+ }
1548
+
1549
+ var setupToolTipContainer = function() {
1550
+ tooltipcontainerElement = document.createElement("div");
1551
+ tooltipcontainerElement.id = "tooltipcontainer";
1552
+ tooltipcontainerElement.innerHTML = template;
1553
+ /*
1554
+ for (i = 0; i < childNodes.length; i++) {
1555
+ parent[0].appendChild(childNodes[i]);
1556
+ }
1557
+ */
1558
+ tipElement = tooltipcontainerElement.querySelector("#tip");
1559
+ tiptextElement = tooltipcontainerElement.querySelector("#tiptext");
1560
+ container.appendChild(tooltipcontainerElement);
1561
+
1562
+ }
1563
+
1564
+ setupToolTipContainer();
1565
+ }
1566
+
1567
+
1568
+
1569
+ /***/ }),
1570
+
1571
+ /***/ "7a89":
1572
+ /***/ (function(module, exports, __webpack_require__) {
1573
+
1574
+ var THREE = __webpack_require__("9206").THREE;
1575
+
1576
+ /**
1577
+ * Create a {@link Zinc.Renderer} on the dom element with corresponding elementID.
1578
+ * @param {String} elementID - id of the target dom element.
1579
+ * @returns {Zinc.Renderer}
1580
+ */
1581
+ var createRenderer = function () {
1582
+ var WEBGL = __webpack_require__("10c9").WEBGL;
1583
+ var localContainer = document.createElement( 'div' );
1584
+ var localRenderer = undefined;;
1585
+ localContainer.style.height = "100%";
1586
+ if (WEBGL.isWebGLAvailable()) {
1587
+ var Zinc = __webpack_require__("9206");
1588
+ var localRenderer = new Zinc.Renderer(localContainer, window);
1589
+ Zinc.defaultMaterialColor = 0xFFFF9C;
1590
+ localRenderer.initialiseVisualisation();
1591
+ localRenderer.playAnimation = false;
1592
+ } else {
1593
+ var warning = WEBGL.getWebGLErrorMessage();
1594
+ localContainer.appendChild(warning);
1595
+ }
1596
+ return {"renderer":localRenderer, "container":localContainer};
1597
+ }
1598
+
1599
+ var RendererModule = function() {
1600
+ (__webpack_require__("3966").BaseModule).call(this);
1601
+ this.scene = undefined;
1602
+ this.toolTip = undefined;
1603
+ this.rendererContainer = undefined;
1604
+ this.displayArea = undefined;
1605
+ this.graphicsHighlight = new (__webpack_require__("8cec").GraphicsHighlight)();
1606
+ this.zincRenderer = null;
1607
+ this.selectedScreenCoordinates = new THREE.Vector3();
1608
+ this.selectedCenter = undefined;
1609
+ }
1610
+
1611
+ RendererModule.prototype = Object.create((__webpack_require__("3966").BaseModule).prototype);
1612
+
1613
+ /**
1614
+ * This function will get the the first intersected object with name or
1615
+ * the first glyph object with name.
1616
+ */
1617
+ RendererModule.prototype.getIntersectedObject = function(intersects) {
1618
+ if (intersects) {
1619
+ for (var i = 0; i < intersects.length; i++) {
1620
+ if (intersects[i] !== undefined) {
1621
+ if (intersects[i].object &&
1622
+ intersects[i].object.userData &&
1623
+ intersects[i].object.userData.isZincObject &&
1624
+ (intersects[i].object.name ||
1625
+ intersects[i].object.userData.isMarker))
1626
+ return intersects[i];
1627
+ }
1628
+ }
1629
+ }
1630
+ return undefined;
1631
+ }
1632
+
1633
+ RendererModule.prototype.getAnnotationsFromObjects = function(objects) {
1634
+ var annotations = [];
1635
+ for (var i = 0; i < objects.length; i++) {
1636
+ var zincObject = objects[i].userData;
1637
+ var annotation = undefined;
1638
+ if (zincObject) {
1639
+ if (zincObject.isGlyph || zincObject.isGlyphset) {
1640
+ var glyphset = zincObject;
1641
+ if (zincObject.isGlyph)
1642
+ glyphset = zincObject.getGlyphset();
1643
+ annotation = glyphset.userData ? glyphset.userData[0] : undefined;
1644
+ if (annotation && annotation.data) {
1645
+ if (objects[i].name && objects[i].name != "")
1646
+ annotation.data.id = objects[i].name;
1647
+ else
1648
+ annotation.data.id = glyphset.groupName;
1649
+ }
1650
+ } else {
1651
+ annotation = zincObject.userData ? zincObject.userData[0] : undefined;
1652
+ if (annotation && annotation.data){
1653
+ annotation.data.id = objects[i].name;
1654
+ }
1655
+ }
1656
+ }
1657
+ annotations[i] = annotation;
1658
+ }
1659
+ return annotations;
1660
+ }
1661
+
1662
+ RendererModule.prototype.setHighlightedByObjects = function(objects, propagateChanges) {
1663
+ var changed = this.graphicsHighlight.setHighlighted(objects);
1664
+ if (changed && propagateChanges) {
1665
+ var eventType = __webpack_require__("549c").EVENT_TYPE.HIGHLIGHTED;
1666
+ var annotations = this.getAnnotationsFromObjects(objects);
1667
+ this.publishChanges(annotations, eventType);
1668
+ }
1669
+ return changed;
1670
+ }
1671
+
1672
+
1673
+ RendererModule.prototype.setHighlightedByZincObject = function(
1674
+ zincObject, propagateChanges) {
1675
+ return this.setHighlightedByObjects([zincObject ? zincObject.morph : undefined], propagateChanges);
1676
+ }
1677
+
1678
+ RendererModule.prototype.setupLiveCoordinates = function(zincObjects) {
1679
+ if (zincObjects && (zincObjects.length > 0)) {
1680
+ var boundingBox = this.scene.getBoundingBoxOfZincObjects(zincObjects);
1681
+ let newSelectedCenter = new THREE.Vector3();
1682
+ boundingBox.getCenter(newSelectedCenter);
1683
+ if (this.selectedCenter == undefined)
1684
+ this.selectedCenter = newSelectedCenter;
1685
+ else {
1686
+ this.selectedCenter.x = newSelectedCenter.x;
1687
+ this.selectedCenter.y = newSelectedCenter.y;
1688
+ }
1689
+ } else {
1690
+ this.selectedCenter = undefined;
1691
+ }
1692
+ }
1693
+
1694
+ RendererModule.prototype.objectsToZincObjects = function(objects) {
1695
+ var zincObjects = [];
1696
+ for (var i = 0; i < objects.length; i++) {
1697
+ var zincObject = objects[i].userData;
1698
+ if (zincObject) {
1699
+ if (zincObject.isGlyph || zincObject.isGlyphset) {
1700
+ var glyphset = zincObject;
1701
+ if (zincObject.isGlyph)
1702
+ glyphset = zincObject.getGlyphset();
1703
+ zincObjects. push(glyphset);
1704
+ } else {
1705
+ zincObjects. push(zincObject);
1706
+ }
1707
+ }
1708
+ }
1709
+ return zincObjects;
1710
+ }
1711
+
1712
+
1713
+ RendererModule.prototype.setSelectedByObjects = function(
1714
+ objects, propagateChanges) {
1715
+ var changed = this.graphicsHighlight.setSelected(objects);
1716
+ if (changed) {
1717
+ var zincObjects = this.objectsToZincObjects(objects);
1718
+ this.setupLiveCoordinates(zincObjects);
1719
+ if (propagateChanges) {
1720
+ var eventType = __webpack_require__("549c").EVENT_TYPE.SELECTED;
1721
+ var annotations = this.getAnnotationsFromObjects(objects);
1722
+ this.publishChanges(annotations, eventType);
1723
+ }
1724
+ }
1725
+ return changed;
1726
+ }
1727
+
1728
+ RendererModule.prototype.setSelectedByZincObject = function(
1729
+ zincObject, propagateChanges) {
1730
+ return this.setSelectedByObjects([zincObject ? zincObject.morph : undefined], propagateChanges);
1731
+ }
1732
+
1733
+ var addGlyphToArray = function(objects) {
1734
+ return function(glyph) {
1735
+ objects.push(glyph.getMesh());
1736
+ }
1737
+ }
1738
+
1739
+ RendererModule.prototype.findObjectsByGroupName = function(groupName) {
1740
+ var geometries = this.scene.findGeometriesWithGroupName(groupName);
1741
+ var objects = [];
1742
+ for (var i = 0; i < geometries.length; i ++ ) {
1743
+ objects.push(geometries[i].morph);
1744
+ }
1745
+ var glyphsets = this.scene.findGlyphsetsWithGroupName(groupName);
1746
+ for (var i = 0; i < glyphsets.length; i ++ ) {
1747
+ glyphsets[i].forEachGlyph(addGlyphToArray(objects));
1748
+ }
1749
+
1750
+ return objects;
1751
+ }
1752
+
1753
+ RendererModule.prototype.setHighlightedByGroupName = function(groupName, propagateChanges) {
1754
+ var objects = this.findObjectsByGroupName(groupName);
1755
+ return this.setHighlightedByObjects(objects, propagateChanges);
1756
+ }
1757
+
1758
+ RendererModule.prototype.setSelectedByGroupName = function(groupName, propagateChanges) {
1759
+ var objects = this.findObjectsByGroupName(groupName);
1760
+ return this.setSelectedByObjects(objects, propagateChanges);
1761
+ }
1762
+
1763
+ RendererModule.prototype.changeBackgroundColour = function(backgroundColourString) {
1764
+ var colour = new THREE.Color(backgroundColourString);
1765
+ if (this.zincRenderer) {
1766
+ var internalRenderer = this.zincRenderer.getThreeJSRenderer();
1767
+ internalRenderer.setClearColor( colour, 1 );
1768
+ }
1769
+ }
1770
+
1771
+ RendererModule.prototype.resetView = function() {
1772
+ if (this.zincRenderer)
1773
+ this.zincRenderer.resetView();
1774
+ }
1775
+
1776
+ RendererModule.prototype.viewAll = function() {
1777
+ if (this.zincRenderer)
1778
+ this.zincRenderer.viewAll();
1779
+ }
1780
+
1781
+ /**
1782
+ * Start the animation and let the renderer to processs with
1783
+ * time progression
1784
+ */
1785
+ RendererModule.prototype.playAnimation = function(flag) {
1786
+ if (this.zincRenderer)
1787
+ this.zincRenderer.playAnimation = flag;
1788
+ }
1789
+
1790
+ /**
1791
+ * Set the speed of playback
1792
+ */
1793
+ RendererModule.prototype.setPlayRate = function(value) {
1794
+ if (this.zincRenderer)
1795
+ this.zincRenderer.setPlayRate(value);
1796
+ }
1797
+
1798
+ /**
1799
+ * Get the speed of playback
1800
+ */
1801
+ RendererModule.prototype.getPlayRate = function(value) {
1802
+ if (this.zincRenderer)
1803
+ return this.zincRenderer.getPlayRate();
1804
+ else
1805
+ return 0.0;
1806
+ }
1807
+
1808
+ /** Initialise everything in the renderer, including the 3D renderer,
1809
+ * and picker for the 3D renderer.
1810
+ *
1811
+ */
1812
+ RendererModule.prototype.initialiseRenderer = function(displayAreaIn) {
1813
+ if (this.zincRenderer === undefined || this.rendererContainer === undefined) {
1814
+ var returnedValue = createRenderer();
1815
+ this.zincRenderer = returnedValue["renderer"];
1816
+ this.rendererContainer = returnedValue["container"];
1817
+ }
1818
+ if (displayAreaIn) {
1819
+ this.displayArea = displayAreaIn;
1820
+ this.displayArea.appendChild( this.rendererContainer );
1821
+ if (this.zincRenderer) {
1822
+ this.zincRenderer.animate();
1823
+ if (this.toolTip === undefined)
1824
+ this.toolTip = new (__webpack_require__("76bf").ToolTip)(this.displayArea);
1825
+ }
1826
+ }
1827
+ }
1828
+
1829
+ RendererModule.prototype.destroy = function() {
1830
+ if (this.zincRenderer) {
1831
+ this.zincRenderer.dispose();
1832
+ this.zincRenderer.getThreeJSRenderer().dispose();
1833
+ this.zincRenderer = undefined;
1834
+ }
1835
+ (__webpack_require__("3966").BaseModule).prototype.destroy.call( this );
1836
+ }
1837
+
1838
+ exports.RendererModule = RendererModule;
1839
+
1840
+
1841
+ /***/ }),
1842
+
1843
+ /***/ "7c81":
1844
+ /***/ (function(module, exports) {
1845
+
1846
+ module.exports = require("core-js/modules/es.array.splice");
1847
+
1848
+ /***/ }),
1849
+
1850
+ /***/ "7d9b":
1851
+ /***/ (function(module, exports, __webpack_require__) {
1852
+
1853
+ // extracted by mini-css-extract-plugin
1854
+
1855
+ /***/ }),
1856
+
1857
+ /***/ "7f9f":
1858
+ /***/ (function(module, exports) {
1859
+
1860
+ module.exports = require("element-ui/lib/locale");
1861
+
1862
+ /***/ }),
1863
+
1864
+ /***/ "80c4":
1865
+ /***/ (function(module, exports) {
1866
+
1867
+ module.exports = require("element-ui/lib/theme-chalk/option.css");
1868
+
1869
+ /***/ }),
1870
+
1871
+ /***/ "850c":
1872
+ /***/ (function(module, exports) {
1873
+
1874
+ module.exports = require("core-js/modules/es.object.to-string");
1875
+
1876
+ /***/ }),
1877
+
1878
+ /***/ "8bbf":
1879
+ /***/ (function(module, exports) {
1880
+
1881
+ module.exports = require("vue");
1882
+
1883
+ /***/ }),
1884
+
1885
+ /***/ "8c29":
1886
+ /***/ (function(module, exports) {
1887
+
1888
+ module.exports = require("element-ui/lib/tabs");
1889
+
1890
+ /***/ }),
1891
+
1892
+ /***/ "8c84":
1893
+ /***/ (function(module, exports) {
1894
+
1895
+ module.exports = require("core-js/modules/es.array.iterator");
1896
+
1897
+ /***/ }),
1898
+
1899
+ /***/ "8cec":
1900
+ /***/ (function(module, exports, __webpack_require__) {
1901
+
1902
+ var THREE = __webpack_require__("9206").THREE;
1903
+
1904
+ /**
1905
+ * This module manages highlighted and selected objects in 3D modules.
1906
+ *
1907
+ * @class
1908
+ * @returns {exports.GraphicsHighlight}
1909
+ */
1910
+ exports.GraphicsHighlight = function() {
1911
+ var currentHighlightedObjects = [];
1912
+ var currentSelectedObjects = [];
1913
+ this.highlightColour = 0x0000FF;
1914
+ this.selectColour = 0x00FF00;
1915
+ this.originalColour = 0x000000;
1916
+ var _this = this;
1917
+
1918
+ var isDifferent = function(array1, array2) {
1919
+ if ((array1.length == 0) && (array2.length == 0))
1920
+ return false;
1921
+
1922
+ for (var i = 0; i < array1.length; i++) {
1923
+ var matched = false;
1924
+ for (var j = 0; j < array2.length; j++) {
1925
+ if (array1[i] === array2[j]) {
1926
+ matched = true;
1927
+ }
1928
+ }
1929
+ if (!matched)
1930
+ return true;
1931
+ }
1932
+ for (var i = 0; i < array2.length; i++) {
1933
+ var matched = false;
1934
+ for (var j = 0; j < array1.length; j++) {
1935
+ if (array2[i] === array1[j]) {
1936
+ matched = true;
1937
+ }
1938
+ }
1939
+ if (!matched)
1940
+ return true;
1941
+ }
1942
+ return false;
1943
+ }
1944
+
1945
+ var getUnmatchingObjects = function(objectsArray1, objectsArray2) {
1946
+ var unmatchingObjects = [];
1947
+ if (objectsArray2.length == 0)
1948
+ return objectsArray1;
1949
+ for (var i = 0; i < objectsArray1.length; i++) {
1950
+ var matched = false;
1951
+ for (var j = 0; j < objectsArray2.length; j++) {
1952
+ if (objectsArray1[i] === objectsArray2[j]) {
1953
+ matched = true;
1954
+ }
1955
+ }
1956
+ if (!matched)
1957
+ unmatchingObjects.push(objectsArray1[i]);
1958
+ }
1959
+ return unmatchingObjects;
1960
+ }
1961
+
1962
+ this.setHighlighted = function(objects) {
1963
+ var previousHighlightedObjects = currentHighlightedObjects;
1964
+ _this.resetHighlighted();
1965
+ // Selected object cannot be highlighted
1966
+ var array = getUnmatchingObjects(objects, currentSelectedObjects);
1967
+ var fullList = getFullListOfObjects(array);
1968
+ for (var i = 0; i < fullList.length; i++) {
1969
+ if (fullList[i] && fullList[i].material && fullList[i].material.emissive)
1970
+ fullList[i].material.emissive.setHex(_this.highlightColour);
1971
+ }
1972
+ currentHighlightedObjects = array;
1973
+ return isDifferent(currentHighlightedObjects, previousHighlightedObjects);
1974
+ }
1975
+
1976
+ this.setSelected = function(objects) {
1977
+ // first find highlighted object that are not selected
1978
+ var previousHSelectedObjects = currentSelectedObjects;
1979
+ var array = getUnmatchingObjects(currentHighlightedObjects, objects);
1980
+ currentHighlightedObjects = array;
1981
+ _this.resetSelected();
1982
+ var fullList = getFullListOfObjects(objects);
1983
+ for (var i = 0; i < fullList.length; i++) {
1984
+ if (fullList[i] && fullList[i].material && fullList[i].material.emissive)
1985
+ fullList[i].material.emissive.setHex(_this.selectColour);
1986
+ }
1987
+ currentSelectedObjects = objects;
1988
+ return isDifferent(currentSelectedObjects, previousHSelectedObjects);
1989
+ }
1990
+
1991
+ var getFullListOfObjects = function(objects) {
1992
+ let fullList = [];
1993
+ for (var i = 0; i < objects.length; i++) {
1994
+ if (objects[i].material)
1995
+ fullList.push(objects[i]);
1996
+ }
1997
+ return fullList;
1998
+ }
1999
+
2000
+ this.resetHighlighted = function() {
2001
+ let fullList = getFullListOfObjects(currentHighlightedObjects);
2002
+ for (var i = 0; i < fullList.length; i++) {
2003
+ if (fullList[i] && fullList[i].material) {
2004
+ if (fullList[i].material.emissive)
2005
+ fullList[i].material.emissive.setHex(_this.originalColour);
2006
+ if (fullList[i].material.depthFunc)
2007
+ fullList[i].material.depthFunc = THREE.LessEqualDepth;
2008
+ }
2009
+ }
2010
+ currentHighlightedObjects = [];
2011
+ }
2012
+
2013
+ this.resetSelected = function() {
2014
+ let fullList = getFullListOfObjects(currentSelectedObjects);
2015
+ for (var i = 0; i < fullList.length; i++) {
2016
+ if (fullList[i] && fullList[i].material) {
2017
+ if (fullList[i].material.emissive)
2018
+ fullList[i].material.emissive.setHex(_this.originalColour);
2019
+ if (fullList[i].material.depthFunc)
2020
+ fullList[i].material.depthFunc = THREE.LessEqualDepth;
2021
+ }
2022
+ }
2023
+ currentSelectedObjects = [];
2024
+ }
2025
+
2026
+ this.getSelected = function() {
2027
+ return currentSelectedObjects;
2028
+ }
2029
+
2030
+ this.reset = function() {
2031
+ _this.resetSelected();
2032
+ _this.resetHighlighted();
2033
+ }
2034
+ }
2035
+
2036
+
2037
+ /***/ }),
2038
+
2039
+ /***/ "8f11":
2040
+ /***/ (function(module, exports) {
2041
+
2042
+ module.exports = require("element-ui/lib/theme-chalk/icon.css");
2043
+
2044
+ /***/ }),
2045
+
2046
+ /***/ "907b":
2047
+ /***/ (function(module, exports) {
2048
+
2049
+ module.exports = require("core-js/modules/es.string.iterator");
2050
+
2051
+ /***/ }),
2052
+
2053
+ /***/ "9206":
2054
+ /***/ (function(module, exports) {
2055
+
2056
+ module.exports = require("zincjs");
2057
+
2058
+ /***/ }),
2059
+
2060
+ /***/ "93e6":
2061
+ /***/ (function(module, exports) {
2062
+
2063
+ module.exports = require("element-ui/lib/popover");
2064
+
2065
+ /***/ }),
2066
+
2067
+ /***/ "9776":
2068
+ /***/ (function(module, exports) {
2069
+
2070
+ module.exports = require("element-ui/lib/theme-chalk/slider.css");
2071
+
2072
+ /***/ }),
2073
+
2074
+ /***/ "9985":
2075
+ /***/ (function(module, exports) {
2076
+
2077
+ module.exports = require("element-ui/lib/theme-chalk/tab-pane.css");
2078
+
2079
+ /***/ }),
2080
+
2081
+ /***/ "9a25":
2082
+ /***/ (function(module, exports) {
2083
+
2084
+ module.exports = require("element-ui/lib/theme-chalk/base.css");
2085
+
2086
+ /***/ }),
2087
+
2088
+ /***/ "9bb0":
2089
+ /***/ (function(module, exports) {
2090
+
2091
+ module.exports = require("@soda/get-current-script");
2092
+
2093
+ /***/ }),
2094
+
2095
+ /***/ "a0d7":
2096
+ /***/ (function(module, exports) {
2097
+
2098
+ exports.annotation = function() {
2099
+ this.type = "anatomical";
2100
+ this.data = undefined;
2101
+ this.isAnnotation = true;
2102
+ }
2103
+
2104
+
2105
+ /***/ }),
2106
+
2107
+ /***/ "a497":
2108
+ /***/ (function(module, exports) {
2109
+
2110
+ module.exports = require("element-ui/lib/col");
2111
+
2112
+ /***/ }),
2113
+
2114
+ /***/ "a525":
2115
+ /***/ (function(module, exports) {
2116
+
2117
+ module.exports = require("element-ui/lib/theme-chalk/popover.css");
2118
+
2119
+ /***/ }),
2120
+
2121
+ /***/ "a7bf":
2122
+ /***/ (function(module, exports) {
2123
+
2124
+ module.exports = require("element-ui/lib/slider");
2125
+
2126
+ /***/ }),
2127
+
2128
+ /***/ "ab7e":
2129
+ /***/ (function(module, exports) {
2130
+
2131
+ module.exports = require("core-js/modules/es.array.includes");
2132
+
2133
+ /***/ }),
2134
+
2135
+ /***/ "ab87":
2136
+ /***/ (function(module, exports) {
2137
+
2138
+ module.exports = require("element-ui/lib/loading");
2139
+
2140
+ /***/ }),
2141
+
2142
+ /***/ "add8":
2143
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2144
+
2145
+ "use strict";
2146
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TraditionalControls_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e8d1");
2147
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TraditionalControls_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TraditionalControls_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__);
2148
+ /* unused harmony reexport * */
2149
+
2150
+
2151
+ /***/ }),
2152
+
2153
+ /***/ "b0e3":
2154
+ /***/ (function(module, exports) {
2155
+
2156
+ module.exports = require("element-ui/lib/theme-chalk/container.css");
2157
+
2158
+ /***/ }),
2159
+
2160
+ /***/ "b2f4":
2161
+ /***/ (function(module, exports) {
2162
+
2163
+ module.exports = require("element-ui/lib/icon");
2164
+
2165
+ /***/ }),
2166
+
2167
+ /***/ "b723":
2168
+ /***/ (function(module, exports, __webpack_require__) {
2169
+
2170
+ // extracted by mini-css-extract-plugin
2171
+
2172
+ /***/ }),
2173
+
2174
+ /***/ "b777":
2175
+ /***/ (function(module, exports) {
2176
+
2177
+ module.exports = require("element-ui/lib/checkbox");
2178
+
2179
+ /***/ }),
2180
+
2181
+ /***/ "bcd8":
2182
+ /***/ (function(module, exports) {
2183
+
2184
+ module.exports = require("core-js/modules/es.function.name");
2185
+
2186
+ /***/ }),
2187
+
2188
+ /***/ "bcda":
2189
+ /***/ (function(module, exports) {
2190
+
2191
+ module.exports = require("core-js/modules/web.dom-collections.for-each");
2192
+
2193
+ /***/ }),
2194
+
2195
+ /***/ "bfab":
2196
+ /***/ (function(module, exports) {
2197
+
2198
+ module.exports = require("core-js/modules/es.string.replace");
2199
+
2200
+ /***/ }),
2201
+
2202
+ /***/ "c11a":
2203
+ /***/ (function(module, exports) {
2204
+
2205
+ module.exports = require("element-ui/lib/option");
2206
+
2207
+ /***/ }),
2208
+
2209
+ /***/ "c45a":
2210
+ /***/ (function(module, exports) {
2211
+
2212
+ module.exports = require("broadcast-channel");
2213
+
2214
+ /***/ }),
2215
+
2216
+ /***/ "d7e1":
2217
+ /***/ (function(module, exports, __webpack_require__) {
2218
+
2219
+ // extracted by mini-css-extract-plugin
2220
+
2221
+ /***/ }),
2222
+
2223
+ /***/ "e42b":
2224
+ /***/ (function(module, exports) {
2225
+
2226
+ module.exports = require("core-js/modules/es.array.from");
2227
+
2228
+ /***/ }),
2229
+
2230
+ /***/ "e8d1":
2231
+ /***/ (function(module, exports, __webpack_require__) {
2232
+
2233
+ // extracted by mini-css-extract-plugin
2234
+
2235
+ /***/ }),
2236
+
2237
+ /***/ "fae3":
2238
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2239
+
2240
+ "use strict";
2241
+ // ESM COMPAT FLAG
2242
+ __webpack_require__.r(__webpack_exports__);
2243
+
2244
+ // EXPORTS
2245
+ __webpack_require__.d(__webpack_exports__, "ScaffoldVuer", function() { return /* reexport */ ScaffoldVuer; });
2246
+
2247
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
2248
+ // This file is imported into lib/wc client bundles.
2249
+
2250
+ if (typeof window !== 'undefined') {
2251
+ var currentScript = window.document.currentScript
2252
+ if (true) {
2253
+ var getCurrentScript = __webpack_require__("9bb0")
2254
+ currentScript = getCurrentScript()
2255
+
2256
+ // for backward compatibility, because previously we directly included the polyfill
2257
+ if (!('currentScript' in document)) {
2258
+ Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
2259
+ }
2260
+ }
2261
+
2262
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
2263
+ if (src) {
2264
+ __webpack_require__.p = src[1] // eslint-disable-line
2265
+ }
2266
+ }
2267
+
2268
+ // Indicate to webpack that this file can be concatenated
2269
+ /* harmony default export */ var setPublicPath = (null);
2270
+
2271
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1ffffadc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ScaffoldVuer.vue?vue&type=template&id=1b66f0b7&scoped=true&
2272
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],ref:"scaffoldContainer",staticClass:"scaffold-container",attrs:{"element-loading-text":"Loading...","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.3)"}},[_c('SvgSpriteColor'),_c('div',{ref:"display",staticStyle:{"height":"100%","width":"100%"},attrs:{"id":"organsDisplayArea","tabindex":"-1"},on:{"keydown":function($event){if(!$event.type.indexOf('key')&&$event.keyCode!==66){ return null; }return _vm.backgroundChangeCallback($event)}}}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.displayUI && !_vm.isTransitioning),expression:"displayUI && !isTransitioning"}]},[(_vm.displayWarning)?_c('el-popover',{ref:"warningPopover",attrs:{"content":_vm.warningMessage,"placement":"right","append-to-body":false,"trigger":"manual","popper-class":"warning-popper right-popper non-selectable"},model:{value:(_vm.hoverVisabilities[6].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[6], "value", $$v)},expression:"hoverVisabilities[6].value"}}):_vm._e(),(_vm.displayWarning)?_c('i',{directives:[{name:"popover",rawName:"v-popover:warningPopover",arg:"warningPopover"}],staticClass:"el-icon-warning warning-icon",on:{"mouseover":function($event){return _vm.showToolitip(6)},"mouseout":function($event){return _vm.hideToolitip(6)}}},[_c('span',{staticClass:"warning-text"},[_vm._v("Beta")])]):_vm._e(),_c('el-popover',{ref:"checkBoxPopover",attrs:{"content":"Change region visibility","placement":"right","append-to-body":false,"trigger":"manual","popper-class":"scaffold-popper right-popper non-selectable"},model:{value:(_vm.hoverVisabilities[5].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[5], "value", $$v)},expression:"hoverVisabilities[5].value"}}),_c('TraditionalControls',{directives:[{name:"popover",rawName:"v-popover:checkBoxPopover",arg:"checkBoxPopover"}],ref:"traditionalControl",attrs:{"help-mode":_vm.helpMode,"module":_vm.$module,"show-colour-picker":_vm.showColourPicker},on:{"object-selected":_vm.objectSelected,"object-hovered":_vm.objectHovered,"drawer-toggled":_vm.drawerToggled}}),_c('div',{staticClass:"opacity-box"},[_c('OpacityControls',{ref:"opacityControl"})],1),(_vm.sceneData.timeVarying)?_c('el-popover',{ref:"sliderPopover",attrs:{"content":"Move the slider to animate the region","placement":"top","append-to-body":false,"trigger":"manual","popper-class":"scaffold-popper top-popper non-selectable"},model:{value:(_vm.hoverVisabilities[4].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[4], "value", $$v)},expression:"hoverVisabilities[4].value"}}):_vm._e(),(_vm.sceneData.timeVarying)?_c('div',{directives:[{name:"popover",rawName:"v-popover:sliderPopover",arg:"sliderPopover"}],staticClass:"time-slider-container",class:[ _vm.minimisedSlider ? 'minimised' : '', _vm.sliderPosition]},[_c('el-tabs',{attrs:{"type":"card"}},[_c('el-tab-pane',{attrs:{"label":"Animate scaffold"}},[_c('el-row',{staticClass:"tab-content"},[(_vm.isPlaying)?_c('SvgIcon',{staticClass:"icon-button video-button",attrs:{"icon":"pause"},nativeOn:{"click":function($event){return _vm.play(false)}}}):_c('SvgIcon',{staticClass:"video-button icon-button",attrs:{"icon":"play"},nativeOn:{"click":function($event){return _vm.play(true)}}}),_c('el-slider',{staticClass:"slider",attrs:{"min":0,"max":_vm.timeMax,"value":_vm.sceneData.currentTime / 100 * _vm.timeMax,"step":0.1,"tooltip-class":"time-slider-tooltip","format-tooltip":_vm.formatTooltip,"marks":_vm.timeStamps},on:{"input":function($event){return _vm.timeChange($event)}}})],1)],1),_c('el-tab-pane',{attrs:{"label":"Animation data"}},[_c('el-row',{staticClass:"tab-content"},[_c('div',{staticClass:"animation-data"},[_vm._v(" Original duration: "),_c('div',{staticClass:"purple"},[_vm._v(" "+_vm._s(_vm.orginalDuration)+" ")])]),_c('div',{staticClass:"animation-data"},[_vm._v(" Animation duration: "),_c('div',{staticClass:"purple"},[_vm._v(" "+_vm._s(_vm.animateDuration)+" ")])]),_c('div',{staticClass:"animation-data"},[_vm._v(" Playback speed "),_c('el-select',{staticClass:"select-box",attrs:{"popper-append-to-body":true,"value":_vm.currentSpeed,"placeholder":"Select","popper-class":"scaffold_viewer_dropdown"},on:{"change":function($event){return _vm.speedChanged($event)}}},_vm._l((_vm.playSpeed),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1)],1)])],1)],1)],1):_vm._e(),_c('div',{staticClass:"bottom-right-control"},[_c('el-popover',{attrs:{"content":"Zoom in","placement":"left","append-to-body":false,"trigger":"manual","popper-class":"scaffold-popper left-popper non-selectable"},model:{value:(_vm.hoverVisabilities[0].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[0], "value", $$v)},expression:"hoverVisabilities[0].value"}},[_c('SvgIcon',{staticClass:"icon-button zoomIn",attrs:{"slot":"reference","icon":"zoomIn"},nativeOn:{"click":function($event){return _vm.zoomIn()},"mouseover":function($event){return _vm.showToolitip(0)},"mouseout":function($event){return _vm.hideToolitip(0)}},slot:"reference"})],1),_c('el-popover',{attrs:{"content":"Zoom out","placement":"top-end","append-to-body":false,"trigger":"manual","popper-class":"scaffold-popper popper-zoomout non-selectable"},model:{value:(_vm.hoverVisabilities[1].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[1], "value", $$v)},expression:"hoverVisabilities[1].value"}},[_c('SvgIcon',{staticClass:"icon-button zoomOut",attrs:{"slot":"reference","icon":"zoomOut"},nativeOn:{"click":function($event){return _vm.zoomOut()},"mouseover":function($event){return _vm.showToolitip(1)},"mouseout":function($event){return _vm.hideToolitip(1)}},slot:"reference"})],1),_c('el-popover',{attrs:{"placement":"top","append-to-body":false,"trigger":"manual","popper-class":"scaffold-popper non-selectable"},model:{value:(_vm.hoverVisabilities[2].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[2], "value", $$v)},expression:"hoverVisabilities[2].value"}},[_c('div',[_vm._v(" Fit to "),_c('br'),_vm._v(" window ")]),_c('SvgIcon',{staticClass:"icon-button fitWindow",attrs:{"slot":"reference","icon":"fitWindow"},nativeOn:{"click":function($event){return _vm.fitWindow()},"mouseover":function($event){return _vm.showToolitip(2)},"mouseout":function($event){return _vm.hideToolitip(2)}},slot:"reference"})],1)],1),_c('el-popover',{ref:"backgroundPopover",attrs:{"placement":"top-start","width":"128","append-to-body":false,"trigger":"click","popper-class":"background-popper non-selectable"}},[_c('el-row',{staticClass:"backgroundText"},[_vm._v(" Change background ")]),_c('el-row',{staticClass:"backgroundChooser"},_vm._l((_vm.availableBackground),function(item){return _c('div',{key:item,class:['backgroundChoice', item, item == _vm.currentBackground ? 'active' :''],on:{"click":function($event){return _vm.backgroundChangeCallback(item)}}})}),0)],1),_c('el-popover',{attrs:{"content":"Change background color","placement":"right","append-to-body":false,"trigger":"manual","popper-class":"scaffold-popper right-popper non-selectable"},model:{value:(_vm.hoverVisabilities[3].value),callback:function ($$v) {_vm.$set(_vm.hoverVisabilities[3], "value", $$v)},expression:"hoverVisabilities[3].value"}},[_c('SvgIcon',{directives:[{name:"popover",rawName:"v-popover:backgroundPopover",arg:"backgroundPopover"}],staticClass:"icon-button background-colour",class:{ open: _vm.drawerOpen, close: !_vm.drawerOpen },attrs:{"slot":"reference","icon":"changeBckgd"},nativeOn:{"mouseover":function($event){return _vm.showToolitip(3)},"mouseout":function($event){return _vm.hideToolitip(3)}},slot:"reference"})],1)],1)],1)}
2273
+ var staticRenderFns = []
2274
+
2275
+
2276
+ // CONCATENATED MODULE: ./src/components/ScaffoldVuer.vue?vue&type=template&id=1b66f0b7&scoped=true&
2277
+
2278
+ // EXTERNAL MODULE: external "core-js/modules/es.array.for-each"
2279
+ var es_array_for_each_ = __webpack_require__("139f");
2280
+
2281
+ // EXTERNAL MODULE: external "core-js/modules/es.array.iterator"
2282
+ var es_array_iterator_ = __webpack_require__("8c84");
2283
+
2284
+ // EXTERNAL MODULE: external "core-js/modules/es.number.to-fixed"
2285
+ var es_number_to_fixed_ = __webpack_require__("319f");
2286
+
2287
+ // EXTERNAL MODULE: external "core-js/modules/es.object.keys"
2288
+ var es_object_keys_ = __webpack_require__("2175");
2289
+
2290
+ // EXTERNAL MODULE: external "core-js/modules/es.object.to-string"
2291
+ var es_object_to_string_ = __webpack_require__("850c");
2292
+
2293
+ // EXTERNAL MODULE: external "core-js/modules/es.string.iterator"
2294
+ var es_string_iterator_ = __webpack_require__("907b");
2295
+
2296
+ // EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each"
2297
+ var web_dom_collections_for_each_ = __webpack_require__("bcda");
2298
+
2299
+ // EXTERNAL MODULE: external "core-js/modules/web.dom-collections.iterator"
2300
+ var web_dom_collections_iterator_ = __webpack_require__("1ce0");
2301
+
2302
+ // EXTERNAL MODULE: external "core-js/modules/web.url"
2303
+ var web_url_ = __webpack_require__("2a6f");
2304
+
2305
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/tabs.css"
2306
+ var tabs_css_ = __webpack_require__("3170");
2307
+
2308
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/base.css"
2309
+ var base_css_ = __webpack_require__("9a25");
2310
+
2311
+ // EXTERNAL MODULE: external "element-ui/lib/tabs"
2312
+ var tabs_ = __webpack_require__("8c29");
2313
+ var tabs_default = /*#__PURE__*/__webpack_require__.n(tabs_);
2314
+
2315
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/tab-pane.css"
2316
+ var tab_pane_css_ = __webpack_require__("9985");
2317
+
2318
+ // EXTERNAL MODULE: external "element-ui/lib/tab-pane"
2319
+ var tab_pane_ = __webpack_require__("31fb");
2320
+ var tab_pane_default = /*#__PURE__*/__webpack_require__.n(tab_pane_);
2321
+
2322
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/slider.css"
2323
+ var slider_css_ = __webpack_require__("9776");
2324
+
2325
+ // EXTERNAL MODULE: external "element-ui/lib/slider"
2326
+ var slider_ = __webpack_require__("a7bf");
2327
+ var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
2328
+
2329
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/select.css"
2330
+ var select_css_ = __webpack_require__("0fe2");
2331
+
2332
+ // EXTERNAL MODULE: external "element-ui/lib/select"
2333
+ var select_ = __webpack_require__("0de2");
2334
+ var select_default = /*#__PURE__*/__webpack_require__.n(select_);
2335
+
2336
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/row.css"
2337
+ var row_css_ = __webpack_require__("fd9c");
2338
+
2339
+ // EXTERNAL MODULE: external "element-ui/lib/row"
2340
+ var row_ = __webpack_require__("6ea3");
2341
+ var row_default = /*#__PURE__*/__webpack_require__.n(row_);
2342
+
2343
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/popover.css"
2344
+ var popover_css_ = __webpack_require__("a525");
2345
+
2346
+ // EXTERNAL MODULE: external "element-ui/lib/popover"
2347
+ var popover_ = __webpack_require__("93e6");
2348
+ var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
2349
+
2350
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/option.css"
2351
+ var option_css_ = __webpack_require__("80c4");
2352
+
2353
+ // EXTERNAL MODULE: external "element-ui/lib/option"
2354
+ var option_ = __webpack_require__("c11a");
2355
+ var option_default = /*#__PURE__*/__webpack_require__.n(option_);
2356
+
2357
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/loading.css"
2358
+ var loading_css_ = __webpack_require__("2c1b");
2359
+
2360
+ // EXTERNAL MODULE: external "element-ui/lib/loading"
2361
+ var loading_ = __webpack_require__("ab87");
2362
+ var loading_default = /*#__PURE__*/__webpack_require__.n(loading_);
2363
+
2364
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/col.css"
2365
+ var col_css_ = __webpack_require__("703d");
2366
+
2367
+ // EXTERNAL MODULE: external "element-ui/lib/col"
2368
+ var col_ = __webpack_require__("a497");
2369
+ var col_default = /*#__PURE__*/__webpack_require__.n(col_);
2370
+
2371
+ // EXTERNAL MODULE: external "vue"
2372
+ var external_vue_ = __webpack_require__("8bbf");
2373
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
2374
+
2375
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1ffffadc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/OpacityControls.vue?vue&type=template&id=4c00a30f&scoped=true&
2376
+ var OpacityControlsvue_type_template_id_4c00a30f_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.material!=undefined)?_c('div',{ref:"control",staticClass:"opacity-control"},[_c('el-drawer',{staticClass:"drawer-content",attrs:{"custom-class":"my-drawer","visible":_vm.drawerOpen,"append-to-body":false,"modal-append-to-body":false,"size":"300","with-header":false,"wrapper-closable":false,"modal":false},on:{"update:visible":function($event){_vm.drawerOpen=$event}}},[(_vm.drawerOpen)?_c('div',{staticClass:"tab-button close",on:{"click":_vm.toggleDrawer}},[_c('i',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('el-container',{staticClass:"opacity-container"},[_c('el-header',{staticClass:"header",attrs:{"height":"37px"}},[_c('div',[_vm._v("Opacity")])]),_c('el-main',{staticClass:"main"},[_c('div',{staticClass:"block"},[_c('span',{staticClass:"display"},[_vm._v(_vm._s(_vm.displayString))]),_c('el-slider',{staticClass:"my-slider",attrs:{"step":0.01,"min":0,"max":1,"format-tooltip":_vm.formatTooltip,"show-tooltip":false},model:{value:(_vm.material.opacity),callback:function ($$v) {_vm.$set(_vm.material, "opacity", $$v)},expression:"material.opacity"}})],1)])],1)],1),(!_vm.drawerOpen)?_c('div',{staticClass:"tab-button open",on:{"click":_vm.toggleDrawer}},[_c('i',{staticClass:"el-icon-arrow-left"})]):_vm._e()],1):_vm._e()}
2377
+ var OpacityControlsvue_type_template_id_4c00a30f_scoped_true_staticRenderFns = []
2378
+
2379
+
2380
+ // CONCATENATED MODULE: ./src/components/OpacityControls.vue?vue&type=template&id=4c00a30f&scoped=true&
2381
+
2382
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/main.css"
2383
+ var main_css_ = __webpack_require__("73ef");
2384
+
2385
+ // EXTERNAL MODULE: external "element-ui/lib/main"
2386
+ var main_ = __webpack_require__("1fe8");
2387
+ var main_default = /*#__PURE__*/__webpack_require__.n(main_);
2388
+
2389
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/icon.css"
2390
+ var icon_css_ = __webpack_require__("8f11");
2391
+
2392
+ // EXTERNAL MODULE: external "element-ui/lib/icon"
2393
+ var icon_ = __webpack_require__("b2f4");
2394
+ var icon_default = /*#__PURE__*/__webpack_require__.n(icon_);
2395
+
2396
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/header.css"
2397
+ var header_css_ = __webpack_require__("51c7");
2398
+
2399
+ // EXTERNAL MODULE: external "element-ui/lib/header"
2400
+ var header_ = __webpack_require__("2de2");
2401
+ var header_default = /*#__PURE__*/__webpack_require__.n(header_);
2402
+
2403
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/drawer.css"
2404
+ var drawer_css_ = __webpack_require__("4c89");
2405
+
2406
+ // EXTERNAL MODULE: external "element-ui/lib/drawer"
2407
+ var drawer_ = __webpack_require__("373b");
2408
+ var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
2409
+
2410
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/container.css"
2411
+ var container_css_ = __webpack_require__("b0e3");
2412
+
2413
+ // EXTERNAL MODULE: external "element-ui/lib/container"
2414
+ var container_ = __webpack_require__("1ac9");
2415
+ var container_default = /*#__PURE__*/__webpack_require__.n(container_);
2416
+
2417
+ // EXTERNAL MODULE: external "element-ui/lib/locale/lang/en"
2418
+ var en_ = __webpack_require__("6bfd");
2419
+ var en_default = /*#__PURE__*/__webpack_require__.n(en_);
2420
+
2421
+ // EXTERNAL MODULE: external "element-ui/lib/locale"
2422
+ var locale_ = __webpack_require__("7f9f");
2423
+ var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
2424
+
2425
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/OpacityControls.vue?vue&type=script&lang=js&
2426
+
2427
+
2428
+
2429
+
2430
+
2431
+
2432
+
2433
+
2434
+
2435
+
2436
+
2437
+
2438
+
2439
+
2440
+
2441
+
2442
+
2443
+
2444
+ //
2445
+ //
2446
+ //
2447
+ //
2448
+ //
2449
+ //
2450
+ //
2451
+ //
2452
+ //
2453
+ //
2454
+ //
2455
+ //
2456
+ //
2457
+ //
2458
+ //
2459
+ //
2460
+ //
2461
+ //
2462
+ //
2463
+ //
2464
+ //
2465
+ //
2466
+ //
2467
+ //
2468
+ //
2469
+ //
2470
+ //
2471
+ //
2472
+ //
2473
+ //
2474
+ //
2475
+ //
2476
+ //
2477
+ //
2478
+ //
2479
+ //
2480
+ //
2481
+ //
2482
+ //
2483
+ //
2484
+ //
2485
+ //
2486
+ //
2487
+ //
2488
+ //
2489
+ //
2490
+ //
2491
+ //
2492
+ //
2493
+ //
2494
+ //
2495
+ //
2496
+ //
2497
+ //
2498
+ //
2499
+ //
2500
+ //
2501
+
2502
+ /* eslint-disable no-alert, no-console */
2503
+
2504
+
2505
+
2506
+ locale_default.a.use(en_default.a);
2507
+ external_vue_default.a.use(container_default.a);
2508
+ external_vue_default.a.use(drawer_default.a);
2509
+ external_vue_default.a.use(header_default.a);
2510
+ external_vue_default.a.use(icon_default.a);
2511
+ external_vue_default.a.use(main_default.a);
2512
+ external_vue_default.a.use(slider_default.a);
2513
+ /**
2514
+ * A component to control the opacity of the target object.
2515
+ */
2516
+
2517
+ /* harmony default export */ var OpacityControlsvue_type_script_lang_js_ = ({
2518
+ name: "OpacityControls",
2519
+ data: function data() {
2520
+ return {
2521
+ displayString: "100%",
2522
+ material: undefined,
2523
+ drawerOpen: true
2524
+ };
2525
+ },
2526
+ watch: {
2527
+ "material.opacity": function materialOpacity() {
2528
+ if (this.material) {
2529
+ this._zincobject.setAlpha(this.material.opacity);
2530
+ }
2531
+ }
2532
+ },
2533
+ mounted: function mounted() {
2534
+ this._zincobject = undefined;
2535
+ },
2536
+ methods: {
2537
+ formatTooltip: function formatTooltip(val) {
2538
+ this.displayString = Math.floor(100 * val + 0.5) + "%";
2539
+ return this.displayString;
2540
+ },
2541
+ toggleDrawer: function toggleDrawer() {
2542
+ this.drawerOpen = !this.drawerOpen;
2543
+ },
2544
+ setObject: function setObject(object) {
2545
+ if (object) this.material = object.morph.material;else this.material = undefined;
2546
+ this._zincobject = object;
2547
+ }
2548
+ }
2549
+ });
2550
+ // CONCATENATED MODULE: ./src/components/OpacityControls.vue?vue&type=script&lang=js&
2551
+ /* harmony default export */ var components_OpacityControlsvue_type_script_lang_js_ = (OpacityControlsvue_type_script_lang_js_);
2552
+ // EXTERNAL MODULE: ./src/components/OpacityControls.vue?vue&type=style&index=0&id=4c00a30f&scoped=true&lang=scss&
2553
+ var OpacityControlsvue_type_style_index_0_id_4c00a30f_scoped_true_lang_scss_ = __webpack_require__("21a1");
2554
+
2555
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2556
+ /* globals __VUE_SSR_CONTEXT__ */
2557
+
2558
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
2559
+ // This module is a runtime utility for cleaner component module output and will
2560
+ // be included in the final webpack user bundle.
2561
+
2562
+ function normalizeComponent (
2563
+ scriptExports,
2564
+ render,
2565
+ staticRenderFns,
2566
+ functionalTemplate,
2567
+ injectStyles,
2568
+ scopeId,
2569
+ moduleIdentifier, /* server only */
2570
+ shadowMode /* vue-cli only */
2571
+ ) {
2572
+ // Vue.extend constructor export interop
2573
+ var options = typeof scriptExports === 'function'
2574
+ ? scriptExports.options
2575
+ : scriptExports
2576
+
2577
+ // render functions
2578
+ if (render) {
2579
+ options.render = render
2580
+ options.staticRenderFns = staticRenderFns
2581
+ options._compiled = true
2582
+ }
2583
+
2584
+ // functional template
2585
+ if (functionalTemplate) {
2586
+ options.functional = true
2587
+ }
2588
+
2589
+ // scopedId
2590
+ if (scopeId) {
2591
+ options._scopeId = 'data-v-' + scopeId
2592
+ }
2593
+
2594
+ var hook
2595
+ if (moduleIdentifier) { // server build
2596
+ hook = function (context) {
2597
+ // 2.3 injection
2598
+ context =
2599
+ context || // cached call
2600
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
2601
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
2602
+ // 2.2 with runInNewContext: true
2603
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
2604
+ context = __VUE_SSR_CONTEXT__
2605
+ }
2606
+ // inject component styles
2607
+ if (injectStyles) {
2608
+ injectStyles.call(this, context)
2609
+ }
2610
+ // register component module identifier for async chunk inferrence
2611
+ if (context && context._registeredComponents) {
2612
+ context._registeredComponents.add(moduleIdentifier)
2613
+ }
2614
+ }
2615
+ // used by ssr in case component is cached and beforeCreate
2616
+ // never gets called
2617
+ options._ssrRegister = hook
2618
+ } else if (injectStyles) {
2619
+ hook = shadowMode
2620
+ ? function () {
2621
+ injectStyles.call(
2622
+ this,
2623
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
2624
+ )
2625
+ }
2626
+ : injectStyles
2627
+ }
2628
+
2629
+ if (hook) {
2630
+ if (options.functional) {
2631
+ // for template-only hot-reload because in that case the render fn doesn't
2632
+ // go through the normalizer
2633
+ options._injectStyles = hook
2634
+ // register for functional component in vue file
2635
+ var originalRender = options.render
2636
+ options.render = function renderWithStyleInjection (h, context) {
2637
+ hook.call(context)
2638
+ return originalRender(h, context)
2639
+ }
2640
+ } else {
2641
+ // inject component registration as beforeCreate hook
2642
+ var existing = options.beforeCreate
2643
+ options.beforeCreate = existing
2644
+ ? [].concat(existing, hook)
2645
+ : [hook]
2646
+ }
2647
+ }
2648
+
2649
+ return {
2650
+ exports: scriptExports,
2651
+ options: options
2652
+ }
2653
+ }
2654
+
2655
+ // CONCATENATED MODULE: ./src/components/OpacityControls.vue
2656
+
2657
+
2658
+
2659
+
2660
+
2661
+
2662
+ /* normalize component */
2663
+
2664
+ var component = normalizeComponent(
2665
+ components_OpacityControlsvue_type_script_lang_js_,
2666
+ OpacityControlsvue_type_template_id_4c00a30f_scoped_true_render,
2667
+ OpacityControlsvue_type_template_id_4c00a30f_scoped_true_staticRenderFns,
2668
+ false,
2669
+ null,
2670
+ "4c00a30f",
2671
+ null
2672
+
2673
+ )
2674
+
2675
+ /* harmony default export */ var OpacityControls = (component.exports);
2676
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1ffffadc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TraditionalControls.vue?vue&type=template&id=b034523c&scoped=true&
2677
+ var TraditionalControlsvue_type_template_id_b034523c_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"traditional-location",class:{ open: _vm.drawerOpen, close: !_vm.drawerOpen }},[_c('div',{staticClass:"traditional-container"},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('div',{staticClass:"regions-display-text"},[_vm._v(" Regions ")])]),_c('el-col',{attrs:{"span":12}},[_c('el-checkbox',{staticClass:"all-checkbox",attrs:{"indeterminate":_vm.isIndeterminate},on:{"change":_vm.handleCheckAllChange},model:{value:(_vm.checkAll),callback:function ($$v) {_vm.checkAll=$$v},expression:"checkAll"}},[_vm._v(" Display all ")])],1)],1),_c('el-checkbox-group',{staticClass:"checkbox-group",attrs:{"size":"small"},on:{"change":_vm.handleCheckedItemsChange},model:{value:(_vm.checkedItems),callback:function ($$v) {_vm.checkedItems=$$v},expression:"checkedItems"}},[_c('div',{staticClass:"checkbox-group-inner"},_vm._l((_vm.sortedPrimitiveGroups),function(item){return _c('el-row',{key:item,attrs:{"label":item}},[_c('div',{staticClass:"checkbox-container"},[_c('el-checkbox',{staticClass:"my-checkbox",class:{ activeItem: _vm.activeRegion === item,
2678
+ hoverItem: _vm.hoverRegion === item },attrs:{"label":item,"checked":true},on:{"change":function($event){return _vm.visibilityToggle(item, $event)}},nativeOn:{"click":function($event){return _vm.itemClicked(item, $event)},"mouseover":function($event){return _vm.checkboxHover(item)}}},[_c('el-color-picker',{class:{ 'show-picker' : _vm.showColourPicker },attrs:{"value":_vm.getColour(item),"size":"small","popper-class":_vm.myPopperClass},on:{"change":function($event){return _vm.setColour(item, $event)}}}),_vm._v(" "+_vm._s(item)+" ")],1)],1)])}),1)])],1),_c('div',{staticClass:"drawer-button",class:{ open: _vm.drawerOpen, close: !_vm.drawerOpen },on:{"click":_vm.toggleDrawer}},[_c('i',{staticClass:"el-icon-arrow-left"})])])}
2679
+ var TraditionalControlsvue_type_template_id_b034523c_scoped_true_staticRenderFns = []
2680
+
2681
+
2682
+ // CONCATENATED MODULE: ./src/components/TraditionalControls.vue?vue&type=template&id=b034523c&scoped=true&
2683
+
2684
+ // EXTERNAL MODULE: external "core-js/modules/es.array.concat"
2685
+ var es_array_concat_ = __webpack_require__("18d2");
2686
+
2687
+ // EXTERNAL MODULE: external "core-js/modules/es.array.includes"
2688
+ var es_array_includes_ = __webpack_require__("ab7e");
2689
+
2690
+ // EXTERNAL MODULE: external "core-js/modules/es.array.index-of"
2691
+ var es_array_index_of_ = __webpack_require__("6bb1");
2692
+
2693
+ // EXTERNAL MODULE: external "core-js/modules/es.array.splice"
2694
+ var es_array_splice_ = __webpack_require__("7c81");
2695
+
2696
+ // EXTERNAL MODULE: external "core-js/modules/es.regexp.exec"
2697
+ var es_regexp_exec_ = __webpack_require__("51f7");
2698
+
2699
+ // EXTERNAL MODULE: external "core-js/modules/es.string.includes"
2700
+ var es_string_includes_ = __webpack_require__("fd48");
2701
+
2702
+ // EXTERNAL MODULE: external "core-js/modules/es.string.replace"
2703
+ var es_string_replace_ = __webpack_require__("bfab");
2704
+
2705
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
2706
+ function _arrayLikeToArray(arr, len) {
2707
+ if (len == null || len > arr.length) len = arr.length;
2708
+
2709
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2710
+ arr2[i] = arr[i];
2711
+ }
2712
+
2713
+ return arr2;
2714
+ }
2715
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
2716
+
2717
+ function _arrayWithoutHoles(arr) {
2718
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
2719
+ }
2720
+ // EXTERNAL MODULE: external "core-js/modules/es.symbol"
2721
+ var es_symbol_ = __webpack_require__("6049");
2722
+
2723
+ // EXTERNAL MODULE: external "core-js/modules/es.symbol.description"
2724
+ var es_symbol_description_ = __webpack_require__("51e9");
2725
+
2726
+ // EXTERNAL MODULE: external "core-js/modules/es.symbol.iterator"
2727
+ var es_symbol_iterator_ = __webpack_require__("02ac");
2728
+
2729
+ // EXTERNAL MODULE: external "core-js/modules/es.array.from"
2730
+ var es_array_from_ = __webpack_require__("e42b");
2731
+
2732
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+
2739
+
2740
+
2741
+ function _iterableToArray(iter) {
2742
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
2743
+ }
2744
+ // EXTERNAL MODULE: external "core-js/modules/es.array.slice"
2745
+ var es_array_slice_ = __webpack_require__("6579");
2746
+
2747
+ // EXTERNAL MODULE: external "core-js/modules/es.function.name"
2748
+ var es_function_name_ = __webpack_require__("bcd8");
2749
+
2750
+ // EXTERNAL MODULE: external "core-js/modules/es.regexp.to-string"
2751
+ var es_regexp_to_string_ = __webpack_require__("5fef");
2752
+
2753
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2754
+
2755
+
2756
+
2757
+
2758
+
2759
+
2760
+
2761
+ function _unsupportedIterableToArray(o, minLen) {
2762
+ if (!o) return;
2763
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2764
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2765
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2766
+ if (n === "Map" || n === "Set") return Array.from(n);
2767
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2768
+ }
2769
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
2770
+ function _nonIterableSpread() {
2771
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2772
+ }
2773
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
2774
+
2775
+
2776
+
2777
+
2778
+ function _toConsumableArray(arr) {
2779
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
2780
+ }
2781
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/color-picker.css"
2782
+ var color_picker_css_ = __webpack_require__("3666");
2783
+
2784
+ // EXTERNAL MODULE: external "element-ui/lib/color-picker"
2785
+ var color_picker_ = __webpack_require__("4914");
2786
+ var color_picker_default = /*#__PURE__*/__webpack_require__.n(color_picker_);
2787
+
2788
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/checkbox-group.css"
2789
+ var checkbox_group_css_ = __webpack_require__("0cf4");
2790
+
2791
+ // EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
2792
+ var checkbox_group_ = __webpack_require__("0607");
2793
+ var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
2794
+
2795
+ // EXTERNAL MODULE: external "element-ui/lib/theme-chalk/checkbox.css"
2796
+ var checkbox_css_ = __webpack_require__("55ee");
2797
+
2798
+ // EXTERNAL MODULE: external "element-ui/lib/checkbox"
2799
+ var checkbox_ = __webpack_require__("b777");
2800
+ var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
2801
+
2802
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TraditionalControls.vue?vue&type=script&lang=js&
2803
+
2804
+
2805
+
2806
+
2807
+
2808
+
2809
+
2810
+
2811
+
2812
+
2813
+
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+
2823
+ //
2824
+ //
2825
+ //
2826
+ //
2827
+ //
2828
+ //
2829
+ //
2830
+ //
2831
+ //
2832
+ //
2833
+ //
2834
+ //
2835
+ //
2836
+ //
2837
+ //
2838
+ //
2839
+ //
2840
+ //
2841
+ //
2842
+ //
2843
+ //
2844
+ //
2845
+ //
2846
+ //
2847
+ //
2848
+ //
2849
+ //
2850
+ //
2851
+ //
2852
+ //
2853
+ //
2854
+ //
2855
+ //
2856
+ //
2857
+ //
2858
+ //
2859
+ //
2860
+ //
2861
+ //
2862
+ //
2863
+ //
2864
+ //
2865
+ //
2866
+ //
2867
+ //
2868
+ //
2869
+ //
2870
+ //
2871
+ //
2872
+ //
2873
+ //
2874
+ //
2875
+ //
2876
+ //
2877
+ //
2878
+ //
2879
+ //
2880
+ //
2881
+ //
2882
+ //
2883
+ //
2884
+ //
2885
+ //
2886
+ //
2887
+ //
2888
+ //
2889
+ //
2890
+ //
2891
+ //
2892
+ //
2893
+
2894
+ /* eslint-disable no-alert, no-console */
2895
+
2896
+
2897
+
2898
+
2899
+ var orderBy = __webpack_require__("6814");
2900
+
2901
+ var uniq = __webpack_require__("4e2d");
2902
+
2903
+ locale_default.a.use(en_default.a);
2904
+ external_vue_default.a.use(checkbox_default.a);
2905
+ external_vue_default.a.use(checkbox_group_default.a);
2906
+ external_vue_default.a.use(color_picker_default.a);
2907
+ external_vue_default.a.use(row_default.a);
2908
+ /**
2909
+ * A vue component for toggling visibility of various regions.
2910
+ */
2911
+
2912
+ /* harmony default export */ var TraditionalControlsvue_type_script_lang_js_ = ({
2913
+ name: "TraditionalControls",
2914
+ props: {
2915
+ /**
2916
+ * @ignore
2917
+ */
2918
+ module: {
2919
+ type: Object,
2920
+ default: undefined
2921
+ },
2922
+
2923
+ /**
2924
+ * Enable/disable colour picker
2925
+ */
2926
+ showColourPicker: Boolean
2927
+ },
2928
+ data: function data() {
2929
+ return {
2930
+ checkAll: true,
2931
+ isIndeterminate: false,
2932
+ checkedItems: [],
2933
+ sortedPrimitiveGroups: [],
2934
+ activeRegion: "",
2935
+ hoverRegion: "",
2936
+ myPopperClass: "hide-scaffold-colour-popup",
2937
+ drawerOpen: true
2938
+ };
2939
+ },
2940
+ watch: {
2941
+ showColourPicker: {
2942
+ immediate: true,
2943
+ handler: function handler() {
2944
+ if (this.showColourPicker) this.myPopperClass = "showPicker";else this.myPopperClass = "hide-scaffold-colour-popup";
2945
+ }
2946
+ }
2947
+ },
2948
+ created: function created() {
2949
+ var tmpArray = this.module.sceneData.geometries.concat(this.module.sceneData.lines);
2950
+ tmpArray = tmpArray.concat(this.module.sceneData.glyphsets);
2951
+ tmpArray = uniq(tmpArray.concat(this.module.sceneData.pointset));
2952
+ this.sortedPrimitiveGroups = orderBy(tmpArray);
2953
+ this.module.addOrganPartAddedCallback(this.organsAdded);
2954
+ this.module.graphicsHighlight.selectColour = 0x444444;
2955
+ },
2956
+ destroyed: function destroyed() {
2957
+ this.sortedPrimitiveGroups = undefined;
2958
+ },
2959
+ methods: {
2960
+ /**
2961
+ * This is called when a new organ is read into the scene.
2962
+ */
2963
+ organsAdded: function organsAdded(name) {
2964
+ if (name && name != "") {
2965
+ var tmpArray = uniq(this.sortedPrimitiveGroups.concat([name]));
2966
+ tmpArray = orderBy(tmpArray);
2967
+ var index = tmpArray.indexOf(undefined);
2968
+
2969
+ if (index > -1) {
2970
+ tmpArray.splice(index, 1);
2971
+ }
2972
+
2973
+ this.sortedPrimitiveGroups = tmpArray;
2974
+ }
2975
+ },
2976
+
2977
+ /**
2978
+ * Select a region by its name.
2979
+ */
2980
+ changeActiveByName: function changeActiveByName(name) {
2981
+ var targetObject = this.getFirstZincObjectWithGroupName(name);
2982
+
2983
+ if (targetObject && targetObject.getVisibility()) {
2984
+ this.activeRegion = name;
2985
+ /**
2986
+ * Triggers when an item has been selected.
2987
+ *
2988
+ * @property {object} target selected object.
2989
+ */
2990
+
2991
+ this.$emit("object-selected", targetObject);
2992
+ } else {
2993
+ this.removeActive();
2994
+ }
2995
+
2996
+ this.removeHover();
2997
+ },
2998
+
2999
+ /**
3000
+ * Hover a region by its name.
3001
+ */
3002
+ changeHoverByName: function changeHoverByName(name) {
3003
+ var targetObject = this.getFirstZincObjectWithGroupName(name);
3004
+
3005
+ if (targetObject) {
3006
+ this.hoverRegion = name;
3007
+ /**
3008
+ * Triggers when an item has been hovered over.
3009
+ *
3010
+ * @property {object} target hovered object.
3011
+ */
3012
+
3013
+ this.$emit("object-hovered", targetObject);
3014
+ } else {
3015
+ this.removeHover();
3016
+ }
3017
+ },
3018
+
3019
+ /**
3020
+ * Unselect the current selected region.
3021
+ */
3022
+ removeActive: function removeActive() {
3023
+ this.activeRegion = "";
3024
+ this.$emit("object-selected", undefined);
3025
+ },
3026
+
3027
+ /**
3028
+ * Unselect the current hover region.
3029
+ */
3030
+ removeHover: function removeHover() {
3031
+ this.hoverRegion = "";
3032
+ this.$emit("object-hovered", undefined);
3033
+ },
3034
+
3035
+ /**
3036
+ * Reset the controls.
3037
+ */
3038
+ clear: function clear() {
3039
+ this.sortedPrimitiveGroups = [];
3040
+ this.checkedItems = [];
3041
+ this.checkAll = true;
3042
+ this.isIndeterminate = false;
3043
+ this.activeRegion = "";
3044
+ this.hoverRegion = "";
3045
+ this.$emit("object-selected", undefined);
3046
+ },
3047
+ getFirstZincObjectWithGroupName: function getFirstZincObjectWithGroupName(name) {
3048
+ if (this.module && this.module.scene) {
3049
+ var array = this.module.scene.findGeometriesWithGroupName(name);
3050
+ if (array.length > 0) return array[0];
3051
+ array = this.module.scene.findGlyphsetsWithGroupName(name);
3052
+ if (array.length > 0) return array[0];
3053
+ array = this.module.scene.findLinesWithGroupName(name);
3054
+ if (array.length > 0) return array[0];
3055
+ array = this.module.scene.findPointsetsWithGroupName(name);
3056
+ if (array.length > 0) return array[0];
3057
+ }
3058
+
3059
+ return undefined;
3060
+ },
3061
+ getColour: function getColour(name) {
3062
+ var graphic = this.getFirstZincObjectWithGroupName(name);
3063
+
3064
+ if (graphic) {
3065
+ var hex = graphic.getColourHex();
3066
+ if (hex) return "#" + hex;
3067
+ }
3068
+
3069
+ return "#FFFFFF";
3070
+ },
3071
+ setColour: function setColour(name, value) {
3072
+ var graphic = this.getFirstZincObjectWithGroupName(name);
3073
+
3074
+ if (graphic) {
3075
+ var hexString = value.replace("#", "0x");
3076
+ graphic.setColourHex(hexString);
3077
+ }
3078
+ },
3079
+ checkboxHover: function checkboxHover(name) {
3080
+ this.changeHoverByName(name);
3081
+ },
3082
+ itemClicked: function itemClicked(name, event) {
3083
+ if (!(event.target.classList.contains("el-checkbox__inner") || event.target.classList.contains("el-checkbox__original"))) {
3084
+ this.changeActiveByName(name);
3085
+ event.preventDefault();
3086
+ }
3087
+ },
3088
+ handleCheckedItemsChange: function handleCheckedItemsChange() {
3089
+ var unnamed = this.checkedItems.includes(undefined) ? true : false;
3090
+ var checkedCount = this.checkedItems.length;
3091
+ if (unnamed) checkedCount--;
3092
+ this.checkAll = checkedCount === this.sortedPrimitiveGroups.length;
3093
+ this.isIndeterminate = checkedCount > 0 && checkedCount < this.sortedPrimitiveGroups.length;
3094
+ },
3095
+ handleCheckAllChange: function handleCheckAllChange(val) {
3096
+ this.checkedItems = val ? _toConsumableArray(this.sortedPrimitiveGroups) : [];
3097
+ this.isIndeterminate = false;
3098
+
3099
+ for (var i = 0; i < this.sortedPrimitiveGroups.length; i++) {
3100
+ this.visibilityToggle(this.sortedPrimitiveGroups[i], this.checkAll);
3101
+ }
3102
+ },
3103
+ viewAll: function viewAll() {
3104
+ this.module.viewAll();
3105
+ },
3106
+ visibilityToggle: function visibilityToggle(item, event) {
3107
+ this.module.changeOrganPartsVisibility(item, event);
3108
+
3109
+ if (event == false) {
3110
+ if (this.activeRegion === item) {
3111
+ this.removeActive();
3112
+ }
3113
+
3114
+ if (this.hoverRegion === item) {
3115
+ this.removeHover();
3116
+ }
3117
+ }
3118
+ },
3119
+ toggleDrawer: function toggleDrawer() {
3120
+ this.drawerOpen = !this.drawerOpen;
3121
+ this.$emit("drawer-toggled", this.drawerOpen);
3122
+ },
3123
+ getState: function getState() {
3124
+ if (this.checkAll) {
3125
+ return {
3126
+ checkAll: true
3127
+ };
3128
+ }
3129
+
3130
+ var checkedItems = _toConsumableArray(this.checkedItems);
3131
+
3132
+ var index = checkedItems.indexOf(undefined);
3133
+
3134
+ if (index > -1) {
3135
+ checkedItems.splice(index, 1);
3136
+ }
3137
+
3138
+ return {
3139
+ checkedItems: checkedItems
3140
+ };
3141
+ },
3142
+ setState: function setState(state) {
3143
+ if (state) {
3144
+ if (state.checkAll) {
3145
+ this.checkedItems = _toConsumableArray(this.sortedPrimitiveGroups);
3146
+
3147
+ for (var i = 0; i < this.sortedPrimitiveGroups.length; i++) {
3148
+ this.module.changeOrganPartsVisibility(this.sortedPrimitiveGroups[i], true);
3149
+ }
3150
+ } else if (state.checkedItems) {
3151
+ this.checkedItems = _toConsumableArray(state.checkedItems);
3152
+
3153
+ for (var _i = 0; _i < this.sortedPrimitiveGroups.length; _i++) {
3154
+ var visible = this.checkedItems.includes(this.sortedPrimitiveGroups[_i]);
3155
+ this.module.changeOrganPartsVisibility(this.sortedPrimitiveGroups[_i], visible);
3156
+ }
3157
+ }
3158
+ }
3159
+
3160
+ this.handleCheckedItemsChange();
3161
+ }
3162
+ }
3163
+ });
3164
+ // CONCATENATED MODULE: ./src/components/TraditionalControls.vue?vue&type=script&lang=js&
3165
+ /* harmony default export */ var components_TraditionalControlsvue_type_script_lang_js_ = (TraditionalControlsvue_type_script_lang_js_);
3166
+ // EXTERNAL MODULE: ./src/components/TraditionalControls.vue?vue&type=style&index=0&id=b034523c&scoped=true&lang=scss&
3167
+ var TraditionalControlsvue_type_style_index_0_id_b034523c_scoped_true_lang_scss_ = __webpack_require__("022d");
3168
+
3169
+ // EXTERNAL MODULE: ./src/components/TraditionalControls.vue?vue&type=style&index=1&lang=css&
3170
+ var TraditionalControlsvue_type_style_index_1_lang_css_ = __webpack_require__("add8");
3171
+
3172
+ // CONCATENATED MODULE: ./src/components/TraditionalControls.vue
3173
+
3174
+
3175
+
3176
+
3177
+
3178
+
3179
+
3180
+ /* normalize component */
3181
+
3182
+ var TraditionalControls_component = normalizeComponent(
3183
+ components_TraditionalControlsvue_type_script_lang_js_,
3184
+ TraditionalControlsvue_type_template_id_b034523c_scoped_true_render,
3185
+ TraditionalControlsvue_type_template_id_b034523c_scoped_true_staticRenderFns,
3186
+ false,
3187
+ null,
3188
+ "b034523c",
3189
+ null
3190
+
3191
+ )
3192
+
3193
+ /* harmony default export */ var TraditionalControls = (TraditionalControls_component.exports);
3194
+ // EXTERNAL MODULE: external "@abi-software/svg-sprite"
3195
+ var svg_sprite_ = __webpack_require__("429c");
3196
+
3197
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ScaffoldVuer.vue?vue&type=script&lang=js&
3198
+
3199
+
3200
+
3201
+
3202
+
3203
+
3204
+
3205
+
3206
+
3207
+
3208
+
3209
+
3210
+
3211
+
3212
+
3213
+
3214
+
3215
+
3216
+
3217
+
3218
+
3219
+
3220
+
3221
+
3222
+
3223
+
3224
+
3225
+
3226
+
3227
+
3228
+
3229
+
3230
+
3231
+
3232
+
3233
+
3234
+ //
3235
+ //
3236
+ //
3237
+ //
3238
+ //
3239
+ //
3240
+ //
3241
+ //
3242
+ //
3243
+ //
3244
+ //
3245
+ //
3246
+ //
3247
+ //
3248
+ //
3249
+ //
3250
+ //
3251
+ //
3252
+ //
3253
+ //
3254
+ //
3255
+ //
3256
+ //
3257
+ //
3258
+ //
3259
+ //
3260
+ //
3261
+ //
3262
+ //
3263
+ //
3264
+ //
3265
+ //
3266
+ //
3267
+ //
3268
+ //
3269
+ //
3270
+ //
3271
+ //
3272
+ //
3273
+ //
3274
+ //
3275
+ //
3276
+ //
3277
+ //
3278
+ //
3279
+ //
3280
+ //
3281
+ //
3282
+ //
3283
+ //
3284
+ //
3285
+ //
3286
+ //
3287
+ //
3288
+ //
3289
+ //
3290
+ //
3291
+ //
3292
+ //
3293
+ //
3294
+ //
3295
+ //
3296
+ //
3297
+ //
3298
+ //
3299
+ //
3300
+ //
3301
+ //
3302
+ //
3303
+ //
3304
+ //
3305
+ //
3306
+ //
3307
+ //
3308
+ //
3309
+ //
3310
+ //
3311
+ //
3312
+ //
3313
+ //
3314
+ //
3315
+ //
3316
+ //
3317
+ //
3318
+ //
3319
+ //
3320
+ //
3321
+ //
3322
+ //
3323
+ //
3324
+ //
3325
+ //
3326
+ //
3327
+ //
3328
+ //
3329
+ //
3330
+ //
3331
+ //
3332
+ //
3333
+ //
3334
+ //
3335
+ //
3336
+ //
3337
+ //
3338
+ //
3339
+ //
3340
+ //
3341
+ //
3342
+ //
3343
+ //
3344
+ //
3345
+ //
3346
+ //
3347
+ //
3348
+ //
3349
+ //
3350
+ //
3351
+ //
3352
+ //
3353
+ //
3354
+ //
3355
+ //
3356
+ //
3357
+ //
3358
+ //
3359
+ //
3360
+ //
3361
+ //
3362
+ //
3363
+ //
3364
+ //
3365
+ //
3366
+ //
3367
+ //
3368
+ //
3369
+ //
3370
+ //
3371
+ //
3372
+ //
3373
+ //
3374
+ //
3375
+ //
3376
+ //
3377
+ //
3378
+ //
3379
+ //
3380
+ //
3381
+ //
3382
+ //
3383
+ //
3384
+ //
3385
+ //
3386
+ //
3387
+ //
3388
+ //
3389
+ //
3390
+ //
3391
+ //
3392
+ //
3393
+ //
3394
+ //
3395
+ //
3396
+ //
3397
+ //
3398
+ //
3399
+ //
3400
+ //
3401
+ //
3402
+ //
3403
+ //
3404
+ //
3405
+ //
3406
+ //
3407
+ //
3408
+ //
3409
+ //
3410
+ //
3411
+ //
3412
+ //
3413
+ //
3414
+ //
3415
+ //
3416
+ //
3417
+ //
3418
+ //
3419
+ //
3420
+ //
3421
+ //
3422
+ //
3423
+ //
3424
+ //
3425
+ //
3426
+ //
3427
+ //
3428
+ //
3429
+ //
3430
+ //
3431
+ //
3432
+ //
3433
+ //
3434
+ //
3435
+ //
3436
+ //
3437
+ //
3438
+ //
3439
+ //
3440
+ //
3441
+ //
3442
+ //
3443
+ //
3444
+ //
3445
+ //
3446
+ //
3447
+ //
3448
+ //
3449
+ //
3450
+ //
3451
+ //
3452
+ //
3453
+ //
3454
+ //
3455
+ //
3456
+ //
3457
+ //
3458
+ //
3459
+ //
3460
+ //
3461
+ //
3462
+ //
3463
+ //
3464
+ //
3465
+ //
3466
+ //
3467
+ //
3468
+ //
3469
+ //
3470
+ //
3471
+ //
3472
+
3473
+ /* eslint-disable no-alert, no-console */
3474
+
3475
+
3476
+
3477
+
3478
+
3479
+
3480
+ locale_default.a.use(en_default.a);
3481
+ external_vue_default.a.use(col_default.a);
3482
+ external_vue_default.a.use(loading_default.a.directive);
3483
+ external_vue_default.a.use(option_default.a);
3484
+ external_vue_default.a.use(popover_default.a);
3485
+ external_vue_default.a.use(row_default.a);
3486
+ external_vue_default.a.use(select_default.a);
3487
+ external_vue_default.a.use(slider_default.a);
3488
+ external_vue_default.a.use(tab_pane_default.a);
3489
+ external_vue_default.a.use(tabs_default.a);
3490
+
3491
+ var OrgansViewer = __webpack_require__("67b6").OrgansViewer;
3492
+
3493
+ var EventNotifier = __webpack_require__("549c").EventNotifier;
3494
+ /**
3495
+ * A vue component of the scaffold viewer.
3496
+ *
3497
+ * @requires ./OpacityControls.vue
3498
+ * @requires ./TraditionalControls.vue
3499
+ */
3500
+
3501
+
3502
+ /* harmony default export */ var ScaffoldVuervue_type_script_lang_js_ = ({
3503
+ name: "ScaffoldVuer",
3504
+ components: {
3505
+ OpacityControls: OpacityControls,
3506
+ SvgIcon: svg_sprite_["SvgIcon"],
3507
+ SvgSpriteColor: svg_sprite_["SvgSpriteColor"],
3508
+ TraditionalControls: TraditionalControls
3509
+ },
3510
+ props: {
3511
+ /**
3512
+ * URL of the zincjs metadata. This value will be ignored if a valid
3513
+ * state prop is also provided.
3514
+ * If the url needs to be updated with state present, please use
3515
+ * the setURL method.
3516
+ */
3517
+ url: {
3518
+ type: String,
3519
+ default: ""
3520
+ },
3521
+
3522
+ /**
3523
+ * Show the colour control of set to true.
3524
+ */
3525
+ showColourPicker: {
3526
+ type: Boolean,
3527
+ default: false
3528
+ },
3529
+
3530
+ /**
3531
+ * Flag to show/hide the UI.
3532
+ */
3533
+ displayUI: {
3534
+ type: Boolean,
3535
+ default: true
3536
+ },
3537
+
3538
+ /**
3539
+ * Display all graphics at start.
3540
+ *
3541
+ * This setting only works when traditional is set to false.
3542
+ */
3543
+ displayAtStartUp: {
3544
+ type: Boolean,
3545
+ default: true
3546
+ },
3547
+
3548
+ /**
3549
+ * Use for toggling the help tooltips.
3550
+ */
3551
+ helpMode: {
3552
+ type: Boolean,
3553
+ default: false
3554
+ },
3555
+
3556
+ /**
3557
+ * Use for show/display beta warning icon.
3558
+ */
3559
+ displayWarning: {
3560
+ type: Boolean,
3561
+ default: true
3562
+ },
3563
+
3564
+ /**
3565
+ * Warning message for the hovered over text
3566
+ * on the warning icon.
3567
+ */
3568
+ warningMessage: {
3569
+ type: String,
3570
+ default: "Beta feature - under active development"
3571
+ },
3572
+
3573
+ /**
3574
+ * Show/hide pickable markers for regions.
3575
+ */
3576
+ displayMarkers: {
3577
+ type: Boolean,
3578
+ default: true
3579
+ },
3580
+
3581
+ /**
3582
+ * Show/hide minimap.
3583
+ */
3584
+ displayMinimap: {
3585
+ type: Boolean,
3586
+ default: false
3587
+ },
3588
+
3589
+ /**
3590
+ * Settings for minimap position, size and alignment.
3591
+ */
3592
+ minimapSettings: {
3593
+ type: Object,
3594
+ default: function _default() {
3595
+ return {
3596
+ x_offset: 16,
3597
+ y_offset: 16,
3598
+ width: 128,
3599
+ height: 128,
3600
+ align: "top-right"
3601
+ };
3602
+ }
3603
+ },
3604
+
3605
+ /**
3606
+ * State containing state of the scaffold.
3607
+ */
3608
+ state: {
3609
+ type: Object,
3610
+ default: undefined
3611
+ },
3612
+
3613
+ /**
3614
+ * Optional prop for the name of the region to focus on,
3615
+ * this option is ignored if state or viewURL is also provided.
3616
+ */
3617
+ region: {
3618
+ type: String,
3619
+ default: ""
3620
+ },
3621
+
3622
+ /**
3623
+ * Optional prop for an URL of containing information of a viewport.
3624
+ * This option is ignored if state is also provided.
3625
+ * It will use the provided URL as base if a relative parth is provided.
3626
+ */
3627
+ viewURL: {
3628
+ type: String,
3629
+ default: ""
3630
+ },
3631
+
3632
+ /**
3633
+ * Settings for turning on/off rendering
3634
+ */
3635
+ render: {
3636
+ type: Boolean,
3637
+ default: true
3638
+ }
3639
+ },
3640
+ data: function data() {
3641
+ return {
3642
+ sceneData: this.$module.sceneData,
3643
+ isPlaying: false,
3644
+
3645
+ /**
3646
+ * This is set when scene is transitioning.
3647
+ */
3648
+ isTransitioning: false,
3649
+ tooltipAppendToBody: false,
3650
+ hoverVisabilities: [{
3651
+ value: false
3652
+ }, {
3653
+ value: false
3654
+ }, {
3655
+ value: false
3656
+ }, {
3657
+ value: false
3658
+ }, {
3659
+ value: false
3660
+ }, {
3661
+ value: false
3662
+ }, {
3663
+ value: false
3664
+ }],
3665
+ inHelp: false,
3666
+ loading: false,
3667
+ duration: 3000,
3668
+ drawerOpen: true,
3669
+ currentBackground: "white",
3670
+ availableBackground: ["white", "lightskyblue", "black"],
3671
+ minimisedSlider: false,
3672
+ sliderPosition: "",
3673
+ timeMax: 100,
3674
+ orginalDuration: "",
3675
+ animateDuration: "6secs",
3676
+ playSpeed: [{
3677
+ value: 0.1,
3678
+ label: "0.1x"
3679
+ }, {
3680
+ value: 0.5,
3681
+ label: "0.5x"
3682
+ }, {
3683
+ value: 1,
3684
+ label: "1x"
3685
+ }, {
3686
+ value: 2,
3687
+ label: "2x"
3688
+ }, {
3689
+ value: 5,
3690
+ label: "5x"
3691
+ }, {
3692
+ value: 10,
3693
+ label: "10x"
3694
+ }],
3695
+ currentSpeed: 1,
3696
+ timeStamps: {}
3697
+ };
3698
+ },
3699
+ watch: {
3700
+ url: {
3701
+ handler: function handler(newValue) {
3702
+ if (this.state === undefined || this.state.url === undefined) this.setURL(newValue);
3703
+ },
3704
+ immediate: true
3705
+ },
3706
+ region: {
3707
+ handler: function handler(region) {
3708
+ if (!(this.state || this.viewURL)) this.setFocusedRegion(region);
3709
+ },
3710
+ immediate: true
3711
+ },
3712
+ state: {
3713
+ handler: function handler(state) {
3714
+ this.setState(state);
3715
+ },
3716
+ immediate: true,
3717
+ deep: true
3718
+ },
3719
+ viewURL: {
3720
+ handler: function handler(viewURL) {
3721
+ this.updateViewURL(viewURL);
3722
+ },
3723
+ immediate: true
3724
+ },
3725
+ helpMode: function helpMode(val) {
3726
+ this.setHelpMode(val);
3727
+ },
3728
+ displayMarkers: function displayMarkers(val) {
3729
+ this.$module.scene.displayMarkers = val;
3730
+ },
3731
+ displayMinimap: function displayMinimap(val) {
3732
+ this.$module.scene.displayMinimap = val;
3733
+ },
3734
+ "sceneData.currentTime": function sceneDataCurrentTime() {
3735
+ /**
3736
+ * Triggers when scene time changes.
3737
+ *
3738
+ * @property {number} time Current build-in time of scene.
3739
+ * of selected object.
3740
+ */
3741
+ this.$emit("timeChanged", this.sceneData.currentTime);
3742
+ },
3743
+ duration: function duration() {
3744
+ this.$module.scene.setDuration(this.duration);
3745
+ },
3746
+ minimapSettings: {
3747
+ deep: true,
3748
+ handler: "updateMinimapScissor"
3749
+ },
3750
+ render: function render(val) {
3751
+ this.toggleRendering(val);
3752
+ }
3753
+ },
3754
+ beforeCreate: function beforeCreate() {
3755
+ this.$module = new OrgansViewer();
3756
+ this.isReady = false;
3757
+ this.selectedObject = undefined;
3758
+ this.hoveredObject = undefined;
3759
+ this.currentBackground = "white";
3760
+ this._currentURL = undefined;
3761
+ this.availableBackground = ["white", "black", "lightskyblue"];
3762
+ },
3763
+ mounted: function mounted() {
3764
+ var eventNotifier = new EventNotifier();
3765
+ eventNotifier.subscribe(this, this.eventNotifierCallback);
3766
+ this.$module.addNotifier(eventNotifier);
3767
+ this.$module.addOrganPartAddedCallback(this.organsAdded);
3768
+ this.$module.initialiseRenderer(this.$refs.display);
3769
+ this.toggleRendering(this.render);
3770
+ this.$module.toolTip = undefined;
3771
+ this.ro = new ResizeObserver(this.adjustLayout).observe(this.$refs.scaffoldContainer);
3772
+ this.defaultRate = this.$module.getPlayRate();
3773
+ },
3774
+ beforeDestroy: function beforeDestroy() {
3775
+ if (this.ro) this.ro.disconnect();
3776
+ this.$module.destroy();
3777
+ this.$module = undefined;
3778
+ },
3779
+ methods: {
3780
+ /**
3781
+ * This is called when a new organ is read into the scene.
3782
+ */
3783
+ organsAdded: function organsAdded() {
3784
+ this.loading = false;
3785
+ },
3786
+
3787
+ /**
3788
+ * This is called when Change backgspeedround colour button
3789
+ * is pressed an causes the backgrouColornd colour to be changed
3790
+ * to one of the three preset colour: white, black and
3791
+ * lightskyblue.
3792
+ */
3793
+ backgroundChangeCallback: function backgroundChangeCallback(colour) {
3794
+ this.currentBackground = colour;
3795
+ this.$module.zincRenderer.getThreeJSRenderer().setClearColor(this.currentBackground, 1);
3796
+ },
3797
+
3798
+ /**
3799
+ * This is called by captueeScreenshot and after the last render
3800
+ * loop, it download a screenshot of the current scene with no UI.
3801
+ */
3802
+ captureScreenshotCallback: function captureScreenshotCallback() {
3803
+ //Remove the callback, only needs to happen once
3804
+ this.$module.zincRenderer.removePostRenderCallbackFunction(this.captureID);
3805
+ var screenshot = this.$module.zincRenderer.getThreeJSRenderer().domElement.toDataURL("image/png");
3806
+ var hrefElement = document.createElement("a");
3807
+ document.body.append(hrefElement);
3808
+ if (!this.captureFilename) hrefElement.download = "screenshot.png";else hrefElement.download = this.captureFilename;
3809
+ hrefElement.href = screenshot;
3810
+ hrefElement.click();
3811
+ hrefElement.remove();
3812
+ },
3813
+
3814
+ /**
3815
+ * Function for capturing a screenshot of the current rendering.
3816
+ *
3817
+ * @param {String} filename filename given to the screenshot.
3818
+ *
3819
+ * @public
3820
+ */
3821
+ captureScreenshot: function captureScreenshot(filename) {
3822
+ this.captureFilename = filename;
3823
+ this.captureID = this.$module.zincRenderer.addPostRenderCallbackFunction(this.captureScreenshotCallback);
3824
+ },
3825
+ formatTooltip: function formatTooltip(val) {
3826
+ if (this.timeMax >= 1000) {
3827
+ if (val) {
3828
+ var sec = (val % 60000 / 1000).toFixed(2) + "s";
3829
+ var min = val > 60000 ? (val / 60000).toFixed(0) + "m " : "";
3830
+ return min + sec;
3831
+ }
3832
+ }
3833
+
3834
+ return val ? val.toFixed(2) + " ms" : "0 ms";
3835
+ },
3836
+
3837
+ /**
3838
+ * Function to reset the view to default.
3839
+ * Also called when the associated button is pressed.
3840
+ *
3841
+ * @public
3842
+ */
3843
+ fitWindow: function fitWindow() {
3844
+ if (this.$module.scene) {
3845
+ this.$module.scene.viewAll();
3846
+ }
3847
+ },
3848
+
3849
+ /**
3850
+ * Function to zoom in.
3851
+ * Also called when the associated button is pressed.
3852
+ *
3853
+ * @public
3854
+ */
3855
+ zoomIn: function zoomIn() {
3856
+ if (this.$module.scene) {
3857
+ this.$module.scene.changeZoomByScrollRateUnit(-1);
3858
+ }
3859
+ },
3860
+
3861
+ /**
3862
+ * Function to zoom out.
3863
+ * Also called when the associated button is pressed.
3864
+ *
3865
+ * @public
3866
+ */
3867
+ zoomOut: function zoomOut() {
3868
+ if (this.$module.scene) {
3869
+ this.$module.scene.changeZoomByScrollRateUnit(1);
3870
+ }
3871
+ },
3872
+
3873
+ /**
3874
+ * Function to change the current play speed.
3875
+ *
3876
+ * @public
3877
+ */
3878
+ speedChanged: function speedChanged(speed) {
3879
+ this.currentSpeed = speed;
3880
+ this.$module.setPlayRate(this.defaultRate * this.currentSpeed);
3881
+ },
3882
+
3883
+ /**
3884
+ * Function used to stop the free spin
3885
+ *
3886
+ * @public
3887
+ */
3888
+ stopFreeSpin: function stopFreeSpin() {
3889
+ var cameracontrol = this.$module.scene.getZincCameraControls();
3890
+ cameracontrol.stopAutoTumble();
3891
+ this.isTransitioning = false;
3892
+ },
3893
+
3894
+ /**
3895
+ * Focus on named region
3896
+ */
3897
+ viewRegion: function viewRegion(name) {
3898
+ if (name && name != "" && this.$module.scene) {
3899
+ var objects = this.$module.scene.findObjectsWithGroupName(name);
3900
+ var box = this.$module.scene.getBoundingBoxOfZincObjects(objects);
3901
+
3902
+ if (box) {
3903
+ this.$module.scene.viewAllWithBoundingBox(box);
3904
+ }
3905
+ }
3906
+ },
3907
+ setFocusedRegion: function setFocusedRegion(name) {
3908
+ if (name) {
3909
+ if (this.isReady) {
3910
+ this.viewRegion(name);
3911
+ } else {
3912
+ this.$module.setFinishDownloadCallback(this.setURLFinishCallback({
3913
+ region: name
3914
+ }));
3915
+ }
3916
+ }
3917
+ },
3918
+ updateViewURL: function updateViewURL(viewURL) {
3919
+ if (viewURL) {
3920
+ if (this.isReady) {
3921
+ var url = new URL(viewURL, this.url);
3922
+ this.$module.scene.loadViewURL(url);
3923
+ } else {
3924
+ this.$module.setFinishDownloadCallback(this.setURLFinishCallback({
3925
+ viewURL: viewURL
3926
+ }));
3927
+ }
3928
+ }
3929
+ },
3930
+
3931
+ /**
3932
+ * Function used to rotate the scene.
3933
+ * Also called when the associated button is pressed.
3934
+ *
3935
+ * @public
3936
+ */
3937
+ freeSpin: function freeSpin() {
3938
+ if (this.$module.scene) {
3939
+ var cameracontrol = this.$module.scene.getZincCameraControls();
3940
+ this.isTransitioning = true;
3941
+ cameracontrol.enableAutoTumble();
3942
+ cameracontrol.autoTumble([1.0, 0.0], Math.PI, true);
3943
+ setTimeout(this.stopFreeSpin, 4000);
3944
+ }
3945
+ },
3946
+
3947
+ /**
3948
+ * Callback when a region is selected/highlighted.
3949
+ * It will also update other controls.
3950
+ */
3951
+ eventNotifierCallback: function eventNotifierCallback(event) {
3952
+ if (event.eventType == 1) {
3953
+ if (this.$refs.traditionalControl) {
3954
+ if (event.identifiers[0]) {
3955
+ var id = event.identifiers[0].data.id ? event.identifiers[0].data.id : event.identifiers[0].data.group;
3956
+ this.$refs.traditionalControl.changeActiveByName(id);
3957
+ } else {
3958
+ this.$refs.traditionalControl.removeActive();
3959
+ }
3960
+ }
3961
+ /**
3962
+ * Triggers when an object has been selected
3963
+ *
3964
+ * @property {array} identifiers array of identifiers
3965
+ * of selected object.
3966
+ */
3967
+
3968
+
3969
+ this.$emit("scaffold-selected", event.identifiers);
3970
+ } else if (event.eventType == 2) {
3971
+ if (this.$refs.traditionalControl) {
3972
+ if (event.identifiers[0]) {
3973
+ var _id = event.identifiers[0].data.id ? event.identifiers[0].data.id : event.identifiers[0].data.group;
3974
+
3975
+ this.$refs.traditionalControl.changeHoverByName(_id);
3976
+ } else this.$refs.traditionalControl.removeHover();
3977
+ }
3978
+ /**
3979
+ * Triggers when an object has been highlighted
3980
+ *
3981
+ * @property {array} identifiers array of identifiers
3982
+ * of highlighted object.
3983
+ */
3984
+
3985
+
3986
+ this.$emit("scaffold-highlighted", event.identifiers);
3987
+ }
3988
+ },
3989
+
3990
+ /**
3991
+ * Get the coordinates of the current selected region.
3992
+ *
3993
+ * @public
3994
+ */
3995
+ getCoordinatesOfSelected: function getCoordinatesOfSelected() {
3996
+ if (this.selectedObject) {
3997
+ return this.$module.scene.getObjectsScreenXY([this.selectedObject]);
3998
+ }
3999
+
4000
+ return undefined;
4001
+ },
4002
+
4003
+ /**
4004
+ * Return an object containing the window coordinates of the
4005
+ * current selected region which will be updated after each render
4006
+ * loop.
4007
+ *
4008
+ * @public
4009
+ */
4010
+ getDynamicSelectedCoordinates: function getDynamicSelectedCoordinates() {
4011
+ return this.$module.selectedScreenCoordinates;
4012
+ },
4013
+
4014
+ /**
4015
+ * Callback when time is changed through the UI.
4016
+ */
4017
+ timeChange: function timeChange(event) {
4018
+ var normalizedTime = event / this.timeMax * 100;
4019
+ if (normalizedTime != this.sceneData.currentTime) this.$module.updateTime(normalizedTime);
4020
+ },
4021
+
4022
+ /**
4023
+ * A callback used by children components. Set the selected zinc object
4024
+ *
4025
+ * @param {object} object Zinc object
4026
+ */
4027
+ objectSelected: function objectSelected(object) {
4028
+ if (object !== this.selectedObject) {
4029
+ this.selectedObject = object;
4030
+ this.$refs.opacityControl.setObject(this.selectedObject);
4031
+ if (object) this.$module.setSelectedByZincObject(object, true);else this.$module.setSelectedByObjects([], true);
4032
+ }
4033
+ },
4034
+
4035
+ /**
4036
+ * A callback used by children components. Set the highlighted zinc object
4037
+ *
4038
+ * @param {object} object Zinc object
4039
+ */
4040
+ objectHovered: function objectHovered(object) {
4041
+ if (object !== this.hoveredObject) {
4042
+ this.hoveredObject = object;
4043
+ if (object) this.$module.setHighlightedByZincObject(object, true);else this.$module.setHighlightedByObjects([], true);
4044
+ }
4045
+ },
4046
+
4047
+ /**
4048
+ * Set the selected by name.
4049
+ *
4050
+ * @param {name} name Name of the region
4051
+ */
4052
+ changeActiveByName: function changeActiveByName(name) {
4053
+ this.$refs.traditionalControl.changeActiveByName(name);
4054
+ if (name === undefined) this.$refs.traditionalControl.removeActive();
4055
+ },
4056
+
4057
+ /**
4058
+ * Set the highlighted by name.
4059
+ *
4060
+ * @param {name} name Name of the region
4061
+ */
4062
+ changeHighlightedByName: function changeHighlightedByName(name) {
4063
+ this.$refs.traditionalControl.changeHoverByName(name);
4064
+ if (name === undefined) this.$refs.traditionalControl.removeHover();
4065
+ },
4066
+
4067
+ /**
4068
+ * Start the animation.
4069
+ *
4070
+ * @param {object} object Zinc object
4071
+ */
4072
+ play: function play(flag) {
4073
+ this.$module.playAnimation(flag);
4074
+ this.isPlaying = flag;
4075
+ },
4076
+
4077
+ /**
4078
+ * Function to toggle on/off overlay help.
4079
+ */
4080
+ setHelpMode: function setHelpMode(helpMode) {
4081
+ if (helpMode) {
4082
+ this.inHelp = true;
4083
+ this.hoverVisabilities.forEach(function (item) {
4084
+ item.value = true;
4085
+ });
4086
+ } else {
4087
+ this.inHelp = false;
4088
+ this.hoverVisabilities.forEach(function (item) {
4089
+ item.value = false;
4090
+ });
4091
+ }
4092
+ },
4093
+
4094
+ /**
4095
+ * This is called when mouse cursor enters supported elements
4096
+ * with help tootltips.
4097
+ */
4098
+ showToolitip: function showToolitip(tooltipNumber) {
4099
+ var _this = this;
4100
+
4101
+ if (!this.inHelp) {
4102
+ this.tooltipWait = setTimeout(function () {
4103
+ _this.hoverVisabilities[tooltipNumber].value = true;
4104
+ }, 500);
4105
+ }
4106
+ },
4107
+
4108
+ /**
4109
+ * This is called when mouse cursor exits supported element..
4110
+ */
4111
+ hideToolitip: function hideToolitip(tooltipNumber) {
4112
+ if (!this.inHelp) {
4113
+ this.hoverVisabilities[tooltipNumber].value = false;
4114
+ clearTimeout(this.tooltipWait);
4115
+ }
4116
+ },
4117
+
4118
+ /**
4119
+ * Called when minimap settings has changed. Pass the
4120
+ * parameters to ZincJS and marked it for update.
4121
+ */
4122
+ updateMinimapScissor: function updateMinimapScissor() {
4123
+ var _this2 = this;
4124
+
4125
+ Object.keys(this.minimapSettings).forEach(function (key) {
4126
+ _this2.$module.scene.minimapScissor[key] = _this2.minimapSettings[key];
4127
+ });
4128
+ this.$module.scene.minimapScissor.updateRequired = true;
4129
+ },
4130
+ updateSettingsfromScene: function updateSettingsfromScene() {
4131
+ this.currentSpeed = 1;
4132
+ this.$module.setPlayRate(this.defaultRate);
4133
+ this.orginalDuration = this.$module.scene.getMetadataTag("OriginalDuration");
4134
+ this.animateDuration = this.$module.scene.getMetadataTag("Duration");
4135
+ var timeStamps = this.$module.scene.getMetadataTag("TimeStamps");
4136
+ this.timeStamps = {};
4137
+
4138
+ for (var key in timeStamps) {
4139
+ this.timeStamps[timeStamps[key]] = key;
4140
+ }
4141
+
4142
+ this.timeMax = this.$module.scene.getDuration();
4143
+ },
4144
+ setURLFinishCallback: function setURLFinishCallback(options) {
4145
+ var _this3 = this;
4146
+
4147
+ return function () {
4148
+ if (options) {
4149
+ if (options.viewport) {
4150
+ _this3.$module.scene.getZincCameraControls().setCurrentCameraSettings(options.viewport);
4151
+ } else if (options.viewURL && options.viewURL !== "") {
4152
+ var url = new URL(options.viewURL, _this3.url);
4153
+
4154
+ _this3.$module.scene.loadViewURL(url);
4155
+ } else if (options.region && options.region !== "") {
4156
+ _this3.viewRegion(options.region);
4157
+ }
4158
+
4159
+ if (options.visibility) {
4160
+ // Some UIs may not be ready at this time.
4161
+ _this3.$nextTick(function () {
4162
+ _this3.$refs.traditionalControl.setState(options.visibility);
4163
+ });
4164
+ }
4165
+ }
4166
+
4167
+ _this3.updateSettingsfromScene();
4168
+
4169
+ _this3.$module.updateTime(0.01);
4170
+
4171
+ _this3.$module.updateTime(0);
4172
+
4173
+ _this3.$module.unsetFinishDownloadCallback();
4174
+
4175
+ _this3.isReady = true;
4176
+ };
4177
+ },
4178
+
4179
+ /**
4180
+ * Function used for getting the current states of the scene. This exported states
4181
+ * can be imported using the importStates method.
4182
+ *
4183
+ * @public
4184
+ */
4185
+ getState: function getState() {
4186
+ var state = {
4187
+ url: this._currentURL,
4188
+ viewport: undefined,
4189
+ visibility: undefined
4190
+ };
4191
+ if (this.$refs.traditionalControl) state.visibility = this.$refs.traditionalControl.getState();
4192
+
4193
+ if (this.$module.scene) {
4194
+ var zincCameraControls = this.$module.scene.getZincCameraControls();
4195
+ state.viewport = zincCameraControls.getCurrentViewport();
4196
+ }
4197
+
4198
+ return state;
4199
+ },
4200
+
4201
+ /**
4202
+ * Function used for importing the states of the scene. This exported states
4203
+ * can be imported using the read states method.
4204
+ *
4205
+ * @public
4206
+ */
4207
+ setState: function setState(state) {
4208
+ if (state) {
4209
+ if (state.url && state.url !== this._currentURL) {
4210
+ this.setURLAndState(state.url, {
4211
+ viewport: state.viewport,
4212
+ visibility: state.visibility
4213
+ });
4214
+ } else {
4215
+ if (state.viewport || state.visibility) {
4216
+ if (this.isReady && this.$module.scene) {
4217
+ if (state.viewport) this.$module.scene.getZincCameraControls().setCurrentCameraSettings(state.viewport);
4218
+ if (state.visibility) this.$refs.traditionalControl.setState(state.visibility);
4219
+ } else {
4220
+ this.$module.setFinishDownloadCallback(this.setURLFinishCallback({
4221
+ viewport: state.viewport,
4222
+ visibility: state.visibility
4223
+ }));
4224
+ }
4225
+ }
4226
+ }
4227
+ }
4228
+ },
4229
+ exportGLTF: function exportGLTF(binary) {
4230
+ return this.$module.scene.exportGLTF(binary);
4231
+ },
4232
+
4233
+ /**
4234
+ * Function used for reading in new scaffold metadata and a custom
4235
+ * viewport. This function will ignore the state prop and
4236
+ * read in the new url.
4237
+ *
4238
+ * @public
4239
+ */
4240
+ setURLAndState: function setURLAndState(newValue, state) {
4241
+ if (newValue != this._currentURL) {
4242
+ var viewport = state && state.viewport ? state.viewport : undefined;
4243
+ var visibility = state && state.visibility ? state.visibility : undefined;
4244
+ this._currentURL = newValue;
4245
+ if (this.$refs.traditionalControl) this.$refs.traditionalControl.clear();
4246
+ this.loading = true;
4247
+ this.isReady = false;
4248
+ this.$module.setFinishDownloadCallback(this.setURLFinishCallback({
4249
+ viewport: viewport,
4250
+ region: this.region,
4251
+ viewURL: this.viewURL,
4252
+ visibility: visibility
4253
+ }));
4254
+ this.$module.loadOrgansFromURL(newValue, undefined, undefined, "scene", undefined);
4255
+ this.$module.scene.displayMarkers = this.displayMarkers;
4256
+ this.$module.scene.displayMinimap = this.displayMinimap;
4257
+ this.updateMinimapScissor();
4258
+ }
4259
+ },
4260
+
4261
+ /**
4262
+ * Function used for reading in new scaffold metadata. This function will ignore
4263
+ * the state prop and read in the new url.
4264
+ *
4265
+ * @public
4266
+ */
4267
+ setURL: function setURL(newValue) {
4268
+ this.setURLAndState(newValue, undefined);
4269
+ },
4270
+
4271
+ /**
4272
+ * Callback when drawer is toggled.
4273
+ *
4274
+ */
4275
+ drawerToggled: function drawerToggled(flag) {
4276
+ this.drawerOpen = flag;
4277
+ this.adjustLayout();
4278
+ },
4279
+
4280
+ /**
4281
+ * Callback using ResizeObserver.
4282
+
4283
+ */
4284
+ adjustLayout: function adjustLayout() {
4285
+ var width = this.$refs.scaffoldContainer.clientWidth;
4286
+ this.minimisedSlider = width < 812;
4287
+
4288
+ if (this.minimisedSlider) {
4289
+ this.sliderPosition = this.drawerOpen ? "right" : "left";
4290
+ } else {
4291
+ this.sliderPosition = "";
4292
+ }
4293
+ },
4294
+ toggleRendering: function toggleRendering(flag) {
4295
+ if (this.$module.zincRenderer) {
4296
+ if (flag) {
4297
+ this.$module.zincRenderer.animate();
4298
+ } else {
4299
+ this.$module.zincRenderer.stopAnimate();
4300
+ }
4301
+ }
4302
+ },
4303
+ forceResize: function forceResize() {
4304
+ if (this.$module.zincRenderer) {
4305
+ this.$module.zincRenderer.onWindowResize();
4306
+ }
4307
+ }
4308
+ }
4309
+ });
4310
+ // CONCATENATED MODULE: ./src/components/ScaffoldVuer.vue?vue&type=script&lang=js&
4311
+ /* harmony default export */ var components_ScaffoldVuervue_type_script_lang_js_ = (ScaffoldVuervue_type_script_lang_js_);
4312
+ // EXTERNAL MODULE: ./src/components/ScaffoldVuer.vue?vue&type=style&index=0&id=1b66f0b7&scoped=true&lang=scss&
4313
+ var ScaffoldVuervue_type_style_index_0_id_1b66f0b7_scoped_true_lang_scss_ = __webpack_require__("fb06");
4314
+
4315
+ // EXTERNAL MODULE: ./src/components/ScaffoldVuer.vue?vue&type=style&index=1&lang=scss&
4316
+ var ScaffoldVuervue_type_style_index_1_lang_scss_ = __webpack_require__("642d");
4317
+
4318
+ // CONCATENATED MODULE: ./src/components/ScaffoldVuer.vue
4319
+
4320
+
4321
+
4322
+
4323
+
4324
+
4325
+
4326
+ /* normalize component */
4327
+
4328
+ var ScaffoldVuer_component = normalizeComponent(
4329
+ components_ScaffoldVuervue_type_script_lang_js_,
4330
+ render,
4331
+ staticRenderFns,
4332
+ false,
4333
+ null,
4334
+ "1b66f0b7",
4335
+ null
4336
+
4337
+ )
4338
+
4339
+ /* harmony default export */ var ScaffoldVuer = (ScaffoldVuer_component.exports);
4340
+ // CONCATENATED MODULE: ./src/components/index.js
4341
+ // The Vue build version to load with the `import` command
4342
+ // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
4343
+
4344
+
4345
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
4346
+
4347
+
4348
+
4349
+
4350
+ /***/ }),
4351
+
4352
+ /***/ "fb06":
4353
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4354
+
4355
+ "use strict";
4356
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_style_index_0_id_1b66f0b7_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d7e1");
4357
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_style_index_0_id_1b66f0b7_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_style_index_0_id_1b66f0b7_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
4358
+ /* unused harmony reexport * */
4359
+
4360
+
4361
+ /***/ }),
4362
+
4363
+ /***/ "fd48":
4364
+ /***/ (function(module, exports) {
4365
+
4366
+ module.exports = require("core-js/modules/es.string.includes");
4367
+
4368
+ /***/ }),
4369
+
4370
+ /***/ "fd9c":
4371
+ /***/ (function(module, exports) {
4372
+
4373
+ module.exports = require("element-ui/lib/theme-chalk/row.css");
4374
+
4375
+ /***/ })
4376
+
4377
+ /******/ });
4378
+ //# sourceMappingURL=scaffoldvuer.common.js.map