diff --git a/CHANGELOG.md b/CHANGELOG.md index c89204d2..f58ad442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # rc: micro bump +- Fix the sizing of circle annotations upon creation +- Include the latest bundled version of the JavaScript frontend, which should + hopefully fix the widget in JupyterLab 3.x. + + +# pypa:pywwt 0.10.3 (2021-01-25) + - Attempt to fix the Qt widget on macOS computers. It appears that a recent update to our HTML introduced some JavaScript syntax that the Qt framework doesn't allow. diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index 56985bb2..10d1460a 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -1,8 +1,27 @@ -# See elsewhere for changelog +# rc: micro bump -This project’s release notes are curated from the Git history of its main -branch. You can find them by looking at [the version of this file on the -`release` branch][branch] or the [GitHub release history][gh-releases]. +- Proclaim compatibility with the 4.x series of @jupyter-widgets/base. This + should get the widget to work in the JupyterLab 3.x series. -[branch]: https://github.com/WorldWideTelescope/pywwt/blob/release/frontend/CHANGELOG.md -[gh-releases]: https://github.com/WorldWideTelescope/pywwt/releases +# npm:pywwt 1.1.0 (2020-10-22) + +- The Jupyter widget has reworked multi-view management to behave much better + when there are multiple views for the same widget model, or when views are + hidden and recreated. +- The Jupyter widget now exposes a _viewConnected trait to indicate the case + when the widget has been created, but there are no active views presented to + the user. This isn't wired up to the Python layer, but it could be useful + later. + +# npm:pywwt 1.0.0 (2020-10-21) + +- Address #258 by transmitting WWT clock information using a reference point and + a rate, rather than constantly transmitting the current time. Dramatically + reduces JS <=> Python traffic. +- Tidy up the JavaScript files. + +# npm:pywwt 0.9.1 (2020-10-18) + +- First release with version number decoupled from the pywwt Python package. +- No code chages, but internal reorganizations including the use of Cranko for + release automation. diff --git a/frontend/package.json b/frontend/package.json index faf2df39..b7d892f6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,7 +4,7 @@ "url": "https://github.com/WorldWideTelescope/pywwt/issues" }, "dependencies": { - "@jupyter-widgets/base": "^2 || ^3", + "@jupyter-widgets/base": "^2 || ^3 || ^4", "underscore": "^1" }, "description": "AAS WorldWide Telescope from Python", diff --git a/pywwt/annotation.py b/pywwt/annotation.py index 8a3dc7f0..3093b9ff 100644 --- a/pywwt/annotation.py +++ b/pywwt/annotation.py @@ -45,7 +45,16 @@ def __init__(self, parent=None, **kwargs): self.parent._send_msg(event='annotation_create', id=self.id, shape=self.shape) - super(Annotation, self).__init__(**kwargs) + + # Normally we would pass the kwargs off to super().__init__(), but it + # seems that doing so bypasses the validation functions, which (at a + # minimum) causes problems for circles because it doesn't normalize + # their radius measurements to the proper units. Just apply the settings + # manually, which invokes the validation machinery properly. + super(Annotation, self).__init__() + + for k, v in kwargs.items(): + setattr(self, k, v) self.parent._annotation_set.add(self) @@ -103,7 +112,7 @@ class Circle(Annotation): line_width = AstropyQuantity(1 * u.pixel, help='Assigns line width in pixels ' '(:class:`~astropy.units.Quantity`)').tag(wwt='lineWidth') - radius = AstropyQuantity(80 * u.pixel, + radius = AstropyQuantity(1 * u.degree, help='Sets the radius for the circle ' '(:class:`~astropy.units.Quantity`)').tag(wwt='radius')