diff --git a/README.md b/README.md index 67b1255496cfbfd52a02dfffdf60197045fa09e1..3481157abf73562adf36db5ae3eb836009a7c064 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Interactive Atlas Viewer is an frontend module wrapping around [nehuba](https:// A live version of the Interactive Atlas Viewer is available at [https://kg.humanbrainproject.org/viewer/](https://kg.humanbrainproject.org/viewer/). This section is useful for developers who would like to develop this project. ### General information -Interactive atlas viewer is built with [Angular (v6.0)](https://angular.io/) and [Bootstrap (v3.3.4)](http://getbootstrap.com/docs/3.3/). Some other notable packages used are: [ng2-charts](https://valor-software.com/ng2-charts/) for charts visualisation, [ngx-bootstrap (v 2.0.5)](https://valor-software.com/ngx-bootstrap/old/2.0.5/) for UI and [ngrx/platform](https://github.com/ngrx/platform) for state management. +Interactive atlas viewer is built with [Angular (v6.0)](https://angular.io/), [Bootstrap (v4)](http://getbootstrap.com/), and [fontawesome icons](https://fontawesome.com/). Some other notable packages used are: [ng2-charts](https://valor-software.com/ng2-charts/) for charts visualisation, [ngx-bootstrap](https://valor-software.com/ngx-bootstrap/) for UI and [ngrx/store](https://github.com/ngrx/platform) for state management. ### Prerequisites diff --git a/src/plugin_examples/README.md b/src/plugin_examples/README.md index 87eea6043b05daff5b00543de0be7494c60643d3..1549c0963fcea559271259fa0fd121187394e066 100644 --- a/src/plugin_examples/README.md +++ b/src/plugin_examples/README.md @@ -25,7 +25,8 @@ The manifest JSON file describes the metadata associated with the plugin. "nestedKey1" : "nestedValue1" } }, - "initStateUrl": "http://LINK-TO-PLUGIN-STATE" + "initStateUrl": "http://LINK-TO-PLUGIN-STATE", + "persistency": false } ``` *NB* @@ -98,9 +99,10 @@ The script will always be appended **after** the rendering of the template. })() ``` *NB* +- JS is loaded and executed **before** the attachment of DOM (template). This is to allow webcomponents have a chance to be loaded. If your script needs the DOM to be attached, use a `setTimeout` callback to delay script execution. - ensure the script is scoped locally, instead of poisoning the global scope - for every observable subscription, call *unsubscribe()* in the *onShutdown* callback - some frameworks such as *jquery2*, *jquery3*, *react/reactdom* and *webcomponents* can be loaded via *interactiveViewer.pluinControl.loadExternalLibraries([LIBRARY_NAME_1, LIBRARY_NAME_2])*. if the libraries are loaded, remember to hook *interactiveViewer.pluginControl.unloadExternalLibraries([LIBRARY_NAME_1,LIBRARY_NAME_2])* in the *onShutdown* callback - when/if using webcomponents, please be aware that the `connectedCallback()` and `disconnectedCallback()` will be called everytime user toggle between *floating* and *docked* modes. -- when user navigate to a new template all existing widgets will be destroyed. +- when user navigate to a new template all existing widgets will be destroyed, unless the `persistency` is set to `true` in `mannifest.json`. - for a list of APIs, see [plugin_api.md](plugin_api.md) diff --git a/src/plugin_examples/plugin_api.md b/src/plugin_examples/plugin_api.md index ad769c5deb46c433afa8f58f124e91ff9b718e6b..913e24aef20c8c936f3d51cce87d9370d02dadd9 100644 --- a/src/plugin_examples/plugin_api.md +++ b/src/plugin_examples/plugin_api.md @@ -136,6 +136,7 @@ window.interactiveViewer - *show()* : Show the toast - *hide()* : Dynamically hides the toast - message : message on the toast + - htmlMessage : HTML message. If used to display user content, beware of script injection. Angular strips `style` attribute, so use `class` and bootstrap for styling. - dismissable : allow user dismiss the toast via x - timeout : auto hide (in ms). set to 0 for not auto hide.