diff --git a/CHANGELOG.md b/CHANGELOG.md index add12d10..724d3bdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# pypa:pywwt 0.10.4 (2021-01-27) + +- 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 diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index 3f36fafb..4d30b7cd 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -1,3 +1,8 @@ +# npm:pywwt 1.1.1 (2021-01-27) + +- Proclaim compatibility with the 4.x series of @jupyter-widgets/base. This + should get the widget to work in the JupyterLab 3.x series. + # npm:pywwt 1.1.0 (2020-10-22) - The Jupyter widget has reworked multi-view management to behave much better diff --git a/frontend/package.json b/frontend/package.json index 98f4b586..c6f92a42 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", @@ -39,5 +39,5 @@ "clean": "shx rm -rf dist", "pywwt-export": "npm run build && npm pack && node pywwt-export.js" }, - "version": "1.1.0" + "version": "1.1.1" } diff --git a/pywwt/_version.py b/pywwt/_version.py index db0ba6ef..ceb0f951 100644 --- a/pywwt/_version.py +++ b/pywwt/_version.py @@ -1,4 +1,4 @@ -version_info = (0, 10, 3, 'final', 0) # cranko project-version tuple +version_info = (0, 10, 4, 'final', 0) # cranko project-version tuple _specifier_ = {'alpha': '.a', 'beta': '.b', 'candidate': '.rc', 'final': '', 'dev': '.dev'} 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')