mapshaper 0.6.15 → 0.6.17
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/mapshaper.js +2929 -106
- package/package.json +94 -85
- package/www/elements.css +0 -8
- package/www/index.html +4 -7
- package/www/mapshaper-gui.js +402 -317
- package/www/mapshaper.js +2929 -106
- package/www/modules.js +7542 -1
- package/www/page.css +27 -5
- package/www/codecs.js +0 -64
- package/www/deflate.js +0 -2060
- package/www/pako.deflate.js +0 -2
- package/www/pako.inflate.js +0 -2
- package/www/z-worker.js +0 -153
- package/www/zip.js +0 -969
package/www/page.css
CHANGED
|
@@ -76,6 +76,19 @@ body {
|
|
|
76
76
|
fill: #1385B7;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
.alert-btn + .alert-btn {
|
|
80
|
+
margin-left: 4px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dialog-btn {
|
|
84
|
+
display: inline-block;
|
|
85
|
+
margin-bottom: 1px;
|
|
86
|
+
margin-top: 1px;
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
color: white;
|
|
89
|
+
min-width: 28px;
|
|
90
|
+
}
|
|
91
|
+
|
|
79
92
|
.dialog-btn:hover:not(.disabled),
|
|
80
93
|
.btn.header-btn:hover,
|
|
81
94
|
.dialog-btn.default-btn,
|
|
@@ -251,13 +264,22 @@ body {
|
|
|
251
264
|
left: 0;
|
|
252
265
|
}
|
|
253
266
|
|
|
267
|
+
.error-wrapper p.error-message {
|
|
268
|
+
margin: 1px 0 0 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.error-wrapper .dialog-btn {
|
|
272
|
+
margin-top: 8px;
|
|
273
|
+
}
|
|
274
|
+
|
|
254
275
|
.error-title {
|
|
276
|
+
line-height: 1.1;
|
|
255
277
|
font-weight: bold;
|
|
256
|
-
margin-bottom:
|
|
278
|
+
margin-bottom: 5px;
|
|
257
279
|
}
|
|
258
280
|
|
|
259
281
|
div.error-box {
|
|
260
|
-
margin-top: 55px;
|
|
282
|
+
margin-top: 42px; /* 55px; */
|
|
261
283
|
overflow: auto;
|
|
262
284
|
max-height: 70%;
|
|
263
285
|
max-width: 400px;
|
|
@@ -516,8 +538,8 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
516
538
|
margin-top: 3px;
|
|
517
539
|
}
|
|
518
540
|
|
|
519
|
-
.option-menu input
|
|
520
|
-
margin: 3px 5px 0
|
|
541
|
+
.option-menu input[type="checkbox"] {
|
|
542
|
+
margin: 3px 5px 0 1px;
|
|
521
543
|
}
|
|
522
544
|
|
|
523
545
|
.option-menu input.radio {
|
|
@@ -743,7 +765,7 @@ img.close-btn {
|
|
|
743
765
|
float: right;
|
|
744
766
|
height: 18px;
|
|
745
767
|
width: 18px;
|
|
746
|
-
margin-top:
|
|
768
|
+
margin-top: 1px;
|
|
747
769
|
margin-right: -5px;
|
|
748
770
|
cursor: pointer;
|
|
749
771
|
border-radius: 4px;
|
package/www/codecs.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/// wrapper for pako (https://github.com/nodeca/pako)
|
|
2
|
-
|
|
3
|
-
/* globals pako */
|
|
4
|
-
(function(global) {
|
|
5
|
-
"use strict";
|
|
6
|
-
|
|
7
|
-
function Codec(isDeflater, options) {
|
|
8
|
-
var newOptions = { raw: true, chunkSize: 1024 * 1024 };
|
|
9
|
-
if (options && typeof options.level === 'number')
|
|
10
|
-
newOptions.level = options.level;
|
|
11
|
-
this._backEnd = isDeflater?
|
|
12
|
-
new pako.Deflate(newOptions) :
|
|
13
|
-
new pako.Inflate(newOptions);
|
|
14
|
-
this._chunks = [];
|
|
15
|
-
this._dataLength = 0;
|
|
16
|
-
this._backEnd.onData = this._onData.bind(this);
|
|
17
|
-
}
|
|
18
|
-
Codec.prototype._onData = function _onData(chunk) {
|
|
19
|
-
this._chunks.push(chunk);
|
|
20
|
-
this._dataLength += chunk.length;
|
|
21
|
-
};
|
|
22
|
-
Codec.prototype._fetchData = function _fetchData() {
|
|
23
|
-
var be = this._backEnd;
|
|
24
|
-
if (be.err !== 0)
|
|
25
|
-
throw new Error(be.msg);
|
|
26
|
-
var chunks = this._chunks;
|
|
27
|
-
var data;
|
|
28
|
-
if (chunks.length === 1)
|
|
29
|
-
data = chunks[0];
|
|
30
|
-
else if (chunks.length > 1) {
|
|
31
|
-
data = new Uint8Array(this._dataLength);
|
|
32
|
-
for (var i = 0, n = chunks.length, off = 0; i < n; i++) {
|
|
33
|
-
var chunk = chunks[i];
|
|
34
|
-
data.set(chunk, off);
|
|
35
|
-
off += chunk.length;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
chunks.length = 0;
|
|
39
|
-
this._dataLength = 0;
|
|
40
|
-
return data;
|
|
41
|
-
};
|
|
42
|
-
Codec.prototype.append = function append(bytes, onprogress) {
|
|
43
|
-
this._backEnd.push(bytes, false);
|
|
44
|
-
return this._fetchData();
|
|
45
|
-
};
|
|
46
|
-
Codec.prototype.flush = function flush() {
|
|
47
|
-
this._backEnd.push(new Uint8Array(0), true);
|
|
48
|
-
return this._fetchData();
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
function Deflater(options) {
|
|
52
|
-
Codec.call(this, true, options);
|
|
53
|
-
}
|
|
54
|
-
Deflater.prototype = Object.create(Codec.prototype);
|
|
55
|
-
function Inflater() {
|
|
56
|
-
Codec.call(this, false);
|
|
57
|
-
}
|
|
58
|
-
Inflater.prototype = Object.create(Codec.prototype);
|
|
59
|
-
|
|
60
|
-
// 'zip' may not be defined in z-worker and some tests
|
|
61
|
-
var env = global.zip || global;
|
|
62
|
-
env.Deflater = env._pako_Deflater = Deflater;
|
|
63
|
-
env.Inflater = env._pako_Inflater = Inflater;
|
|
64
|
-
})(this);
|