From 75c4dd0fba9abed2ce63af2d3f961705d7214069 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <p.gawron@atcomp.pl> Date: Thu, 7 Nov 2024 10:03:18 +0100 Subject: [PATCH] typos fixed --- docs/plugins/data/bioentities.md | 12 ++++++------ docs/plugins/errors.md | 2 +- docs/plugins/events.md | 30 +++++++++++++++++------------- docs/plugins/map/position.md | 4 ++-- docs/plugins/plugins.md | 10 +++++----- public/config.js | 2 ++ 6 files changed, 33 insertions(+), 27 deletions(-) diff --git a/docs/plugins/data/bioentities.md b/docs/plugins/data/bioentities.md index e6d8fd8c..52b7eaf5 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 9958a801..d8ddee6f 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 b996c0c5..b89b725a 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 a08872c6..67a397d3 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 1636f258..b9df0d3d 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 486d0144..4d245aa0 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`, -- GitLab