scichart 3.2.549 → 3.2.555

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "scichart",
3
3
  "description": "Fast WebGL JavaScript Charting Library and Framework",
4
4
  "homepage": "https://www.scichart.com",
5
- "version": "3.2.549",
5
+ "version": "3.2.555",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "keywords": [
@@ -1,3 +1,4 @@
1
+ import { TSciChart } from "./TSciChart";
1
2
  /**
2
3
  * Enumeration constants to define search mode
3
4
  */
@@ -19,3 +20,9 @@ export declare enum ESearchMode {
19
20
  */
20
21
  RoundUp = "RoundUp"
21
22
  }
23
+ /**
24
+ * Converts ESearchMode (typescript friendly Enum) to SCRTFindIndexSearchMode which is required by the webassembly engine
25
+ * @param wasmContext
26
+ * @param mode
27
+ */
28
+ export declare const convertSearchMode: (wasmContext: TSciChart, mode: ESearchMode) => import("./TSciChart").SCRTFindIndexSearchMode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ESearchMode = void 0;
3
+ exports.convertSearchMode = exports.ESearchMode = void 0;
4
4
  /**
5
5
  * Enumeration constants to define search mode
6
6
  */
@@ -23,3 +23,21 @@ var ESearchMode;
23
23
  */
24
24
  ESearchMode["RoundUp"] = "RoundUp";
25
25
  })(ESearchMode = exports.ESearchMode || (exports.ESearchMode = {}));
26
+ /**
27
+ * Converts ESearchMode (typescript friendly Enum) to SCRTFindIndexSearchMode which is required by the webassembly engine
28
+ * @param wasmContext
29
+ * @param mode
30
+ */
31
+ var convertSearchMode = function (wasmContext, mode) {
32
+ switch (mode) {
33
+ case ESearchMode.Exact:
34
+ return wasmContext.SCRTFindIndexSearchMode.Exact;
35
+ case ESearchMode.Nearest:
36
+ return wasmContext.SCRTFindIndexSearchMode.Nearest;
37
+ case ESearchMode.RoundDown:
38
+ return wasmContext.SCRTFindIndexSearchMode.RoundDown;
39
+ case ESearchMode.RoundUp:
40
+ return wasmContext.SCRTFindIndexSearchMode.RoundUp;
41
+ }
42
+ };
43
+ exports.convertSearchMode = convertSearchMode;