diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c04f5b2d..ad89e3e6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,37 @@ Fragment files in ``upcoming_changes/`` are assembled into this file by .. towncrier release notes start +0.4.1 (2026-07-26) +================== + +New Features +------------ + +- Added ``max_extent=`` to :class:`~anyplotlib.widgets.RangeWidget` and + :class:`~anyplotlib.widgets.RectangleWidget` (and the matching + ``add_range_widget`` / ``add_rectangle_widget`` factories) — a size cap enforced + *while dragging*, so the widget physically stops growing instead of being + clamped after the fact. The dragged edge/corner pins and the opposite one stays + put, so the selection never jumps under the cursor. ``RangeWidget`` takes a span + width in data units; ``RectangleWidget`` takes a scalar (both axes) or a + ``(max_w, max_h)`` pair. Default ``None`` leaves widgets unbounded. + + Use it when a widget's size drives real downstream work — e.g. an integrating + selector whose span is a number of frames to read. + + +Bug Fixes +--------- + +- Fixed the band-style :class:`~anyplotlib.widgets.RangeWidget` being impossible + to drag by its body when narrow. Each edge claimed a fixed ±12 px grab zone, so + a band under ~24 px wide on screen (routine when zoomed out, or when its span is + capped) had no grabbable middle: aiming at the body to translate the band caught + an edge and resized it instead. Each edge now takes at most a third of the + band's width, leaving the middle third for the move handle. Wide bands are + unaffected. + + 0.4.0 (2026-07-18) ================== diff --git a/docs/_root/index.html b/docs/_root/index.html index 37409016..2f4c98a7 100644 --- a/docs/_root/index.html +++ b/docs/_root/index.html @@ -4,12 +4,12 @@ anyplotlib – redirecting… - - + +

- Redirecting to v0.4.0 documentation… + Redirecting to v0.4.1 documentation

diff --git a/docs/_root/switcher.json b/docs/_root/switcher.json index 0682fa50..11b86b84 100644 --- a/docs/_root/switcher.json +++ b/docs/_root/switcher.json @@ -4,6 +4,11 @@ "version": "dev", "url": "https://cssfrancis.github.io/anyplotlib/dev/" }, + { + "name": "v0.4.1 (stable)", + "version": "v0.4.1", + "url": "https://cssfrancis.github.io/anyplotlib/v0.4.1/" + }, { "name": "v0.4.0 (stable)", "version": "v0.4.0", diff --git a/docs/conf.py b/docs/conf.py index 8d22ba19..b73790a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,7 @@ project = "anyplotlib" copyright = "2026, anyplotlib contributors" author = "anyplotlib contributors" -release = "0.4.0" +release = "0.4.1" # When built in CI the workflow sets DOCS_VERSION to the tag name (e.g. # "v0.1.0") or "dev". Fall back to "dev" for local builds. diff --git a/pyproject.toml b/pyproject.toml index 43e0ec7e..1c71c55d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ exclude = [ [project] name = "anyplotlib" -version = "0.4.0" +version = "0.4.1" description = "A plotting library using python, javascript and anywidget for performant in browser plotting." readme = "README.md" license = { text = "MIT" } diff --git a/upcoming_changes/+narrow_band_grab.bugfix.rst b/upcoming_changes/+narrow_band_grab.bugfix.rst deleted file mode 100644 index 5554c780..00000000 --- a/upcoming_changes/+narrow_band_grab.bugfix.rst +++ /dev/null @@ -1,7 +0,0 @@ -Fixed the band-style :class:`~anyplotlib.widgets.RangeWidget` being impossible -to drag by its body when narrow. Each edge claimed a fixed ±12 px grab zone, so -a band under ~24 px wide on screen (routine when zoomed out, or when its span is -capped) had no grabbable middle: aiming at the body to translate the band caught -an edge and resized it instead. Each edge now takes at most a third of the -band's width, leaving the middle third for the move handle. Wide bands are -unaffected. diff --git a/upcoming_changes/+widget_max_extent.new_feature.rst b/upcoming_changes/+widget_max_extent.new_feature.rst deleted file mode 100644 index 81c785d3..00000000 --- a/upcoming_changes/+widget_max_extent.new_feature.rst +++ /dev/null @@ -1,11 +0,0 @@ -Added ``max_extent=`` to :class:`~anyplotlib.widgets.RangeWidget` and -:class:`~anyplotlib.widgets.RectangleWidget` (and the matching -``add_range_widget`` / ``add_rectangle_widget`` factories) — a size cap enforced -*while dragging*, so the widget physically stops growing instead of being -clamped after the fact. The dragged edge/corner pins and the opposite one stays -put, so the selection never jumps under the cursor. ``RangeWidget`` takes a span -width in data units; ``RectangleWidget`` takes a scalar (both axes) or a -``(max_w, max_h)`` pair. Default ``None`` leaves widgets unbounded. - -Use it when a widget's size drives real downstream work — e.g. an integrating -selector whose span is a number of frames to read.