@abi-software/scaffoldvuer 0.1.2 → 0.1.5-1.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js ADDED
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ extends: [
3
+ // add more generic rulesets here, such as:
4
+ 'plugin:vue/recommended', // Use this if you are using Vue.js 2.x.,
5
+
6
+ ],
7
+ rules: {
8
+ // override/add rules settings here, such as:
9
+ // 'vue/no-unused-vars': 'error'
10
+ }
11
+ }
12
+
package/README.md CHANGED
@@ -1,2 +1,88 @@
1
- Scaffoldvuer
2
- Vue component of the PhysiomePortal Scaffold Viewer
1
+ # Scaffoldvuer
2
+
3
+ This project aims to provide high-level 3D physiological models viewing capability.
4
+
5
+
6
+ ## Scaffoldvuer on NPM
7
+
8
+ Scaffoldvuer is available on npm and can be installed into your project with the following command:
9
+ ```bash
10
+ npm i @abi-software/scaffoldvuer
11
+ ```
12
+
13
+ ## Project setup
14
+ ```
15
+ npm install
16
+ ```
17
+
18
+ ### Compiles and minifies for production
19
+ ```
20
+ npm run build-bundle
21
+ ```
22
+
23
+ ## How to use
24
+ Install the package in your vue app project with the following command "npm i @abi-software/scaffoldvuer".
25
+ Import the package in your script as followed:
26
+ ```javascript
27
+ import { ScaffoldVuer } from '@abi-software/scaffoldvuer';
28
+ import '@abi-software/scaffoldvuer/dist/scaffoldvuer.css';
29
+ ```
30
+ Local registration in vue component:
31
+ ```javascript
32
+ export default {
33
+ ...
34
+ components: {
35
+ ScaffoldVuer,
36
+ }
37
+ ...
38
+ }
39
+ ```
40
+
41
+
42
+ The codes above register the ScaffoldVuer component in the global scope.
43
+ You can now use the ScaffoldVuer in your vue template as followed:
44
+ ```html
45
+ <ScaffoldVuer url="Metafile.json" v-on:scaffold-selected="ScaffoldSelected" style="height:50%"/>
46
+ ```
47
+
48
+ url should be a variable/string containing the url of a compatible json model.
49
+ scaffold-selected is the custom event triggered when a part of the 3D-scaffold is selected, see below for a
50
+ sample callback.
51
+
52
+ ```javascript
53
+ methods: {
54
+ ScaffoldSelected: function(annotation) {
55
+ console.log(annotation);
56
+ }
57
+ }
58
+ ```
59
+ A more in depth API reference can be found here: https://abi-software.github.io/scaffoldvuer/ .
60
+
61
+ ## Project setup from Github
62
+
63
+ The source code is available from Github, it can be found here: https://github.com/ABI-Software/scaffoldvuer .
64
+
65
+ ### Clone the respositroy
66
+ ```bash
67
+ git clone https://github.com/ABI-Software/scaffoldvuer.git
68
+ ```
69
+
70
+ ### Setup
71
+ ```bash
72
+ npm install
73
+ ```
74
+
75
+ ### Compiles and minifies for production
76
+ ```bash
77
+ npm run build-bundle
78
+ ```
79
+
80
+ ### Run the sample application
81
+ ```bash
82
+ npm run serve
83
+ ```
84
+
85
+
86
+ ## Example
87
+ The following example showcases ScaffoldVuer in action: https://mapcore-demo.org/current/scaffoldvuer/
88
+
package/babel.config.js CHANGED
@@ -1,5 +1,14 @@
1
1
  module.exports = {
2
2
  presets: [
3
3
  '@vue/cli-plugin-babel/preset'
4
+ ],
5
+ plugins: [
6
+ [
7
+ "component",
8
+ {
9
+ libraryName: "element-ui",
10
+ styleLibraryName: "theme-chalk"
11
+ }
12
+ ]
4
13
  ]
5
14
  }