• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jumpinjackie / mapguide-react-layout / 15160437878

21 May 2025 11:00AM UTC coverage: 21.631% (-42.6%) from 64.24%
15160437878

Pull #1552

github

web-flow
Merge 8b7153d9e into 236e2ea07
Pull Request #1552: Feature/package updates 2505

839 of 1165 branches covered (72.02%)

11 of 151 new or added lines in 25 files covered. (7.28%)

1332 existing lines in 50 files now uncovered.

4794 of 22163 relevant lines covered (21.63%)

6.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.63
/src/api/runtime.ts
1
/**
2
 * runtime.ts
3
 *
4
 * This represents a runtime environment where components can interact with the map viewer
5
 * in the traditional way. This module is mainly for servicing the AJAX viewer API emulation.
6
 *
7
 * Where possible, use actions instead of this module
8
 */
9
import { IMapViewer } from "../api/common";
10
import { debug } from '../utils/logger';
1✔
11

12
let _fusionRoot: string | undefined;
1✔
13
let _viewer: IMapViewer | undefined;
1✔
14

15
/**
16
 * Sets the Fusion base URL
17
 *
18
 * @export
19
 * @param {string} root
20
 */
21
export function setFusionRoot(root: string): void {
1✔
22
    _fusionRoot = root;
×
23
    debug(`Fusion root set to: ${root}. Access to Fusion backend services and widget content will be relative to this value`);
×
UNCOV
24
}
×
25

26
/**
27
 * Gets the Fusion base URL
28
 *
29
 * @export
30
 * @returns {string}
31
 */
32
export function getFusionRoot(): string {
1✔
33
    return _fusionRoot || "../fusion";
×
UNCOV
34
}
×
35

36
/**
37
 * Sets the viewer instance. Called by the map viewer component when it has mounted.
38
 *
39
 * DO NOT CALL DIRECTLY
40
 *
41
 * @hidden
42
 * @param {IMapViewer} viewer
43
 */
44
export function setViewer(viewer: IMapViewer): void {
1✔
45
    _viewer = viewer;
×
UNCOV
46
}
×
47

48
/**
49
 * Gets whether the runtime environment is ready
50
 *
51
 * @export
52
 * @returns {boolean}
53
 */
54
export function isReady(): boolean {
1✔
55
    return _viewer != null;
×
UNCOV
56
}
×
57

58
/**
59
 * Gets the map viewer in this runtime environment
60
 *
61
 * @export
62
 * @returns {IMapViewer}
63
 * @deprecated You should be using the map provider context accessed via the {@link useMapProviderContext} hook where possible
64
 */
65
export function getViewer(): IMapViewer | undefined {
1✔
66
    return _viewer;
1✔
67
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc