Add support for editable Label annotation#12825
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-3.4 #12825 +/- ##
===========================================
Coverage 92.64% 92.65%
===========================================
Files 321 321
Lines 20415 20428 +13
===========================================
+ Hits 18914 18927 +13
Misses 1501 1501 |
1bf1454 to
8fafa06
Compare
8fafa06 to
1a28567
Compare
1a28567 to
7e6f20a
Compare
7e6f20a to
7e4cbc4
Compare
|
Note that this PR only implements rotation under |
5a0b0cb to
409c8cd
Compare
|
@mattpap looks like some SVG issues, are these related to any known open SVG issues or if not should there be new ones opened?
|
| This property is experimental and may change at any point. | ||
| """) | ||
|
|
||
| editable = Bool(default=False, help=""" |
There was a problem hiding this comment.
Would rotatable be better / more specific? When I opened this PR and saw "editable" I first thought this was a about editing the text of the labels
There was a problem hiding this comment.
This indeed may be confusing for labels, but is consistent with other APIs. All APIs broadly related to editability are experimental, so we can iterate over the design. Perhaps a better choice would have been interactive, but if we decide so, then this will have to be applied consistently. I will leave this for now. There will be more changes like this one in near future, specifically text editability of Text glyph and Label, so will have a better picture then.
It's a "known issue" related drawing arcs on SVG canvas, but I don't see any open issue for that. I will open one. |
409c8cd to
b42b884
Compare
|
Actually there is an issue for broken |
* Clean up the implementation of Label annotation * Add support for anchor/padding to Label * Add support for editable Label rotation * Add support for border radius * Connect compute_geometry() * Support node resolution in Label * Update examples/basic/annotations/label.py * Update defaults' baseline * Resolve issues with positioning math text labels * Generalize the implementation for Title * Unify layout and get_size() handling * Include padding in get_size() computation * Robustify unit tests * Add visual tests for Title * Add visual tests for Label * Partially update HTML* variants * Add release notes * Update visual baselines
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |


This continues the work done in PR #12468. This PR adds support for editing (
movingand especially rotating)Labelannotations. It also adds feature parity withTextglyph, i.e. adds support for padding and rounded corners (this includesTitleannotation).Titlewithpadding=10,border_radius=8and line styling:Rotation of
Labelwitheditable=True:Screencast_00005.mp4