celestial-chart 0.8.0 → 0.8.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.md +16 -0
- package/build/celestial.cjs +5 -2
- package/build/celestial.js +5 -2
- package/build/celestial.min.js +3 -3
- package/build/celestial.mjs +5 -2
- package/package.json +1 -1
- package/src/celestial.js +17 -1
- package/src/core.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Layers added with `Celestial.add()` could not draw. They reach the map through
|
|
8
|
+
the global `Celestial` object — `Celestial.container`, `.context`,
|
|
9
|
+
`.mapProjection` — which is how upstream's examples are written, and which
|
|
10
|
+
worked upstream because `this` inside `display()` *was* the global object.
|
|
11
|
+
In this fork the global receives that interface only after the constructor has
|
|
12
|
+
finished, while the zoom behaviour already triggers a redraw inside it. A
|
|
13
|
+
layer's `redraw` handler therefore ran against `Celestial.container === null`,
|
|
14
|
+
and the resulting exception aborted `display()` itself: the map was left
|
|
15
|
+
without its zoom, rotation and export interface. User layers are now held back
|
|
16
|
+
until the interface is published, and drawn immediately afterwards. Covered by
|
|
17
|
+
a browser assertion in `harness/verify.mjs`.
|
|
18
|
+
|
|
3
19
|
## 0.8.0 — first release of the fork
|
|
4
20
|
|
|
5
21
|
Forked from [d3-celestial](https://github.com/ofrohn/d3-celestial) `0.7.35`
|
package/build/celestial.cjs
CHANGED
|
@@ -7143,7 +7143,7 @@ function geoZoom() {
|
|
|
7143
7143
|
// src/core.js
|
|
7144
7144
|
var Celestial = {
|
|
7145
7145
|
// Must match the package version — guarded by test/package.test.mjs.
|
|
7146
|
-
version: "0.8.
|
|
7146
|
+
version: "0.8.1",
|
|
7147
7147
|
container: null,
|
|
7148
7148
|
data: []
|
|
7149
7149
|
};
|
|
@@ -14485,6 +14485,7 @@ var SkyMap = class {
|
|
|
14485
14485
|
var cfg, mapProjection, parentElement, zoom, map2, circle, daylight, starnames = {}, dsonames = {};
|
|
14486
14486
|
var base = options && options.standalone ? settings : void 0;
|
|
14487
14487
|
var instance = this;
|
|
14488
|
+
var layersEnabled = false;
|
|
14488
14489
|
function $(id2) {
|
|
14489
14490
|
return document.querySelector(parentElement + " #" + id2);
|
|
14490
14491
|
}
|
|
@@ -14972,7 +14973,7 @@ var SkyMap = class {
|
|
|
14972
14973
|
}
|
|
14973
14974
|
});
|
|
14974
14975
|
}
|
|
14975
|
-
if (Celestial.data.length > 0) {
|
|
14976
|
+
if (layersEnabled && Celestial.data.length > 0) {
|
|
14976
14977
|
Celestial.data.forEach(function(d) {
|
|
14977
14978
|
d.redraw();
|
|
14978
14979
|
});
|
|
@@ -15320,6 +15321,7 @@ var SkyMap = class {
|
|
|
15320
15321
|
animate();
|
|
15321
15322
|
};
|
|
15322
15323
|
load();
|
|
15324
|
+
layersEnabled = true;
|
|
15323
15325
|
}
|
|
15324
15326
|
};
|
|
15325
15327
|
["constellations", "constellation"].forEach(function(name_) {
|
|
@@ -15342,6 +15344,7 @@ Celestial.display = function(config) {
|
|
|
15342
15344
|
if (key_ === "constructor" || key_ === "constellations" || key_ === "constellation") continue;
|
|
15343
15345
|
Object.defineProperty(Celestial, key_, descriptors[key_]);
|
|
15344
15346
|
}
|
|
15347
|
+
instance.redraw();
|
|
15345
15348
|
return instance;
|
|
15346
15349
|
};
|
|
15347
15350
|
|
package/build/celestial.js
CHANGED
|
@@ -7123,7 +7123,7 @@
|
|
|
7123
7123
|
// src/core.js
|
|
7124
7124
|
var Celestial = {
|
|
7125
7125
|
// Must match the package version — guarded by test/package.test.mjs.
|
|
7126
|
-
version: "0.8.
|
|
7126
|
+
version: "0.8.1",
|
|
7127
7127
|
container: null,
|
|
7128
7128
|
data: []
|
|
7129
7129
|
};
|
|
@@ -14465,6 +14465,7 @@
|
|
|
14465
14465
|
var cfg, mapProjection, parentElement, zoom, map2, circle, daylight, starnames = {}, dsonames = {};
|
|
14466
14466
|
var base = options && options.standalone ? settings : void 0;
|
|
14467
14467
|
var instance = this;
|
|
14468
|
+
var layersEnabled = false;
|
|
14468
14469
|
function $(id2) {
|
|
14469
14470
|
return document.querySelector(parentElement + " #" + id2);
|
|
14470
14471
|
}
|
|
@@ -14952,7 +14953,7 @@
|
|
|
14952
14953
|
}
|
|
14953
14954
|
});
|
|
14954
14955
|
}
|
|
14955
|
-
if (Celestial.data.length > 0) {
|
|
14956
|
+
if (layersEnabled && Celestial.data.length > 0) {
|
|
14956
14957
|
Celestial.data.forEach(function(d) {
|
|
14957
14958
|
d.redraw();
|
|
14958
14959
|
});
|
|
@@ -15300,6 +15301,7 @@
|
|
|
15300
15301
|
animate();
|
|
15301
15302
|
};
|
|
15302
15303
|
load();
|
|
15304
|
+
layersEnabled = true;
|
|
15303
15305
|
}
|
|
15304
15306
|
};
|
|
15305
15307
|
["constellations", "constellation"].forEach(function(name_) {
|
|
@@ -15322,6 +15324,7 @@
|
|
|
15322
15324
|
if (key_ === "constructor" || key_ === "constellations" || key_ === "constellation") continue;
|
|
15323
15325
|
Object.defineProperty(Celestial, key_, descriptors[key_]);
|
|
15324
15326
|
}
|
|
15327
|
+
instance.redraw();
|
|
15325
15328
|
return instance;
|
|
15326
15329
|
};
|
|
15327
15330
|
|