diff --git a/docs/plugins/data/bioentities.md b/docs/plugins/data/bioentities.md index e6d8fd8c611ea2997be3d141025ca60821a74268..52b7eaf5be8ade9bd1a5e5d05b52a28ee4ed073e 100644 --- a/docs/plugins/data/bioentities.md +++ b/docs/plugins/data/bioentities.md @@ -19,7 +19,7 @@ Below is a description of the methods, as well as the types they return. A descr - gets list of added markers - returns array of `Marker` - `getShownElements` - - gets list of all currently shown content/chemicals/drugs bioentities + markers + - gets list of all currently shown content/chemicals/drugs BioEntities + markers - returns object of ``` { @@ -68,12 +68,12 @@ Below is a description of the methods, as well as the types they return. A descr - **opacity** - should be a float between `0` and `1` (example: `0.54`) - **x** - x coord on the map [surface/pin marker only] - **y** - y coord on the map [surface/pin marker only] - - **width** - width of surface [surface marker only] - - **height** - width of height [surface marker only] - - **number** - number presented on the pin [pin marker only] + - **width** - width of surface + - **height** - height of surface + - **number** - number presented on the pin - **modelId** - if marker should be visible only on single map, modelId should be provided - - **start** - start point of the line [line marker only] - - **end** - end point of the line [line marker only] + - **start** - start point of the line + - **end** - end point of the line - adds one marker to markers list - returns created `Marker` - examples: diff --git a/docs/plugins/errors.md b/docs/plugins/errors.md index 9958a801c236704ab1ea5157068b2d0e5b988857..d8ddee6f9d668d4cf5de1ebc9d7204c8f5eb3031 100644 --- a/docs/plugins/errors.md +++ b/docs/plugins/errors.md @@ -36,7 +36,7 @@ ## Zoom errors -- **Provided zoom value exeeds max zoom of ...**: This error occurs when `zoom` param of `setZoom` exeeds max zoom value of the selected map +- **Provided zoom value exceeds max zoom of ...**: This error occurs when `zoom` param of `setZoom` exceeds max zoom value of the selected map - **Provided zoom value exceeds min zoom of ...**: This error occurs when `zoom` param of `setZoom` exceeds min zoom value of the selected map diff --git a/docs/plugins/events.md b/docs/plugins/events.md index b996c0c5e5ed98aa9551e8fe2e4d1d2f56b87f4e..b89b725a3cf388f84c75f5144f147b71be08940a 100644 --- a/docs/plugins/events.md +++ b/docs/plugins/events.md @@ -69,7 +69,7 @@ To listen for specific events, plugins can use the `addListener` method in `even - onSearch - triggered after completing a search; the elements returned by the search are passed as arguments. Three separate events 'onSearch' are triggered, each with a different searched category type. Category types include: bioEntity, drugs, chemicals, reaction. Example argument: -```javascript +``` { type: 'drugs', searchValues: ['PRKN'], @@ -171,7 +171,7 @@ To listen for specific events, plugins can use the `addListener` method in `even - onZoomChanged - triggered after changing the zoom level on the map; the zoom level and the map ID are passed as argument. Example argument: -```javascript +```json { "modelId": 52, "zoom": 9.033753064925367 @@ -180,7 +180,7 @@ To listen for specific events, plugins can use the `addListener` method in `even - onCenterChanged - triggered after the coordinates of the map center change; the coordinates of the center and map ID are passed as argument. Example argument: -```javascript +```json { "modelId": 52, "x": 8557, @@ -190,7 +190,7 @@ To listen for specific events, plugins can use the `addListener` method in `even - onBioEntityClick - triggered when someone clicks on a pin; the element to which the pin is attached is passed as an argument. Example argument: -```javascript +```json { "id": 40072, "modelId": 52, @@ -200,29 +200,33 @@ To listen for specific events, plugins can use the `addListener` method in `even - onPinIconClick - triggered when someone clicks on a pin icon; the element to which the pin is attached is passed as an argument. Example argument: -```javascript +```json { - "id": 40072, + "id": 40072 } ``` -```javascript +Marker pin: + +```json { - "id": "b0a478ad-7e7a-47f5-8130-e96cbeaa0cfe", // marker pin + "id": "b0a478ad-7e7a-47f5-8130-e96cbeaa0cfe" } ``` -- onSurfaceClick - triggered when someone clicks on a overlay surface; the element to which the pin is attached is passed as an argument. Example argument: +- onSurfaceClick - triggered when someone clicks on an overlay surface; the element to which the pin is attached is passed as an argument. Example argument: -```javascript +```json { - "id": 18, + "id": 18 } ``` -```javascript +Surface marker overlay: + +```json { - "id": "a3a5305f-acfa-47ff-bf77-a26d017c6eb3", // surface marker overlay + "id": "a3a5305f-acfa-47ff-bf77-a26d017c6eb3" } ``` diff --git a/docs/plugins/map/position.md b/docs/plugins/map/position.md index a08872c6e6c00f67b041ef4b97641ef3ff84580e..67a397d3180a062a725e12e83bf74e1aeaebd1c2 100644 --- a/docs/plugins/map/position.md +++ b/docs/plugins/map/position.md @@ -1,4 +1,4 @@ -### Map positon +### Map position With use of the methods below plugins can access and modify user position data. @@ -33,7 +33,7 @@ window.minerva.map.setZoom(-14); #### Get center -User position is defined as center coordinate. It's value is defined as x/y/z points of current viewport center translated to map position. Plugins can access center value and modify it. +User position is defined as center coordinate. Its value is defined as x/y/z points of current viewport center translated to map position. Plugins can access center value and modify it. To get current position value, plugins can use the `window.minerva.map.getCenter()` method which returns current position value as an object containing `x`, `y` and `z` fields. All of them are non-negative numbers but `z` is an optional field and it defines current zoom value. If argument is invalid, `getCenter` method throws an error. diff --git a/docs/plugins/plugins.md b/docs/plugins/plugins.md index 1636f258387c5e49c2fab61848a79db723bff32b..b9df0d3d8a36b6c06858f6945bef02f66252222d 100644 --- a/docs/plugins/plugins.md +++ b/docs/plugins/plugins.md @@ -28,17 +28,17 @@ window.minerva.plugins.registerPlugin({ The `window.minerva.plugins.registerPlugin` method returns object with `element` property which is a DOM element, allowing your plugin to append its HTML content to the DOM. Use this element to create and modify the HTML structure of your plugin. -``` +```javascript // Plugin registration const { element } = window.minerva.plugins.registerPlugin({ - pluginName: "Your Plugin Name", - pluginVersion: "1.0.0", - pluginUrl: "your-plugin-url", + pluginName: 'Your Plugin Name', + pluginVersion: '1.0.0', + pluginUrl: 'your-plugin-url', }); // Modify plugin's HTML structure const yourContent = document.createElement('div'); -yourContent.textContent = "Your Plugin Content"; +yourContent.textContent = 'Your Plugin Content'; element.appendChild(yourContent); ``` diff --git a/public/config.js b/public/config.js index 486d01447b0a63fc61cf907a5f10c709b56f9832..4d245aa0d429a56c8c6eb2e3cf44078f4edef59e 100644 --- a/public/config.js +++ b/public/config.js @@ -1,4 +1,6 @@ // const root = 'https://minerva-dev.lcsb.uni.lu'; +// const root = 'https://scimap.lcsb.uni.lu'; + const root = 'https://lux1.atcomp.pl'; window.config = { BASE_API_URL: `${root}/minerva/api`,