@sswroom/sswr 1.4.1 → 1.5.1
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/Changelog +31 -0
- package/cesium.d.ts +36 -1
- package/cesium.js +85 -0
- package/kml.d.ts +60 -15
- package/kml.js +203 -25
- package/leaflet.d.ts +50 -3
- package/leaflet.js +229 -1
- package/map.d.ts +2 -1
- package/map.js +3 -3
- package/math.js +11 -11
- package/olayer2.d.ts +2 -1
- package/olayer2.js +5 -0
- package/osm.d.ts +1 -0
- package/osm.js +5 -0
- package/package.json +1 -1
- package/parser.d.ts +4 -0
- package/parser.js +460 -0
- package/text.d.ts +2 -1
- package/text.js +12 -1
- package/unit.d.ts +355 -39
- package/unit.js +933 -65
- package/web.d.ts +2 -1
- package/web.js +42 -0
package/web.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export function loadJSON(url: string, onResultFunc: Function): void;
|
|
|
12
12
|
export function buildTable(o: object | object[]): string;
|
|
13
13
|
export function openData(data: string, contentType: string, fileName?: string): void;
|
|
14
14
|
export function parseCSSColor(c: string): Color;
|
|
15
|
-
export function handleFileDrop(ele: HTMLElement, hdlr: (file:
|
|
15
|
+
export function handleFileDrop(ele: HTMLElement, hdlr: (file: File)=>void): void;
|
|
16
|
+
export function appendUrl(targetUrl: string, docUrl: string): string;
|
|
16
17
|
|
|
17
18
|
declare class DialogButton
|
|
18
19
|
{
|
package/web.js
CHANGED
|
@@ -503,6 +503,48 @@ export function handleFileDrop(ele, hdlr)
|
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
+
export function appendUrl(targetUrl, docUrl)
|
|
507
|
+
{
|
|
508
|
+
if (targetUrl.indexOf(":") >= 0)
|
|
509
|
+
return targetUrl;
|
|
510
|
+
var i = docUrl.indexOf("://");
|
|
511
|
+
if (i < 0)
|
|
512
|
+
return targetUrl;
|
|
513
|
+
var j = docUrl.indexOf("/", i + 3);
|
|
514
|
+
if (j < 0)
|
|
515
|
+
{
|
|
516
|
+
j = docUrl.length;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
if (targetUrl.startsWith("/"))
|
|
520
|
+
{
|
|
521
|
+
return docUrl.substring(0, j) + targetUrl;
|
|
522
|
+
}
|
|
523
|
+
i = docUrl.lastIndexOf("/");
|
|
524
|
+
while (true)
|
|
525
|
+
{
|
|
526
|
+
if (targetUrl.startsWith("./"))
|
|
527
|
+
{
|
|
528
|
+
targetUrl = targetUrl.substring(2);
|
|
529
|
+
}
|
|
530
|
+
else if (targetUrl.startsWith("../"))
|
|
531
|
+
{
|
|
532
|
+
targetUrl = targetUrl.substring(3);
|
|
533
|
+
if (i > j)
|
|
534
|
+
{
|
|
535
|
+
docUrl = docUrl.substring(0, i);
|
|
536
|
+
i = docUrl.lastIndexOf("/");
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
else
|
|
540
|
+
{
|
|
541
|
+
if (i >= j)
|
|
542
|
+
docUrl = docUrl.substring(0, i);
|
|
543
|
+
return docUrl + "/" + targetUrl;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
506
548
|
export class Dialog
|
|
507
549
|
{
|
|
508
550
|
constructor(content, options)
|