Mercurial > octave
diff scripts/plot/draw/private/__quiver__.m @ 27790:0157c4d4792e
legend.m: Handle builtin hggroup-based objects (bug #57260)
* __contour__.m, __scatter__.m, __stem__.m, __quiver__.m, __errplot__.m:
Set "__creator__" appdata.
* legend.m: Use "icon" rather than "item" to name the icon objects
(textitem_objects): Rename "texticon_objects". Use the new "create_icon"
function to create objects. Use the icon object's appdata to store the
creator for further triage.
(create_icon): Decide what objects to create using the "__creator__" appdata
of hggroups. Add listener to delete all legend objects for an item which has
its peer objects deleted.
(textitem_data): Rename "update_texticon_data". Call "update_icon_position"
rather than returning an array of data
(update_icon_position): New function that is aware of how to compute the
position of the the icon object depending on the hggroup creator.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sun, 08 Dec 2019 17:52:18 +0100 |
parents | 6bfd3a890185 |
children | b442ec6dda5c |
line wrap: on
line diff
--- a/scripts/plot/draw/private/__quiver__.m Tue Dec 03 17:50:59 2019 +0100 +++ b/scripts/plot/draw/private/__quiver__.m Sun Dec 08 17:52:18 2019 +0100 @@ -182,7 +182,7 @@ endif ## Must occur after __next_line_color__ in order to work correctly. - hg = hggroup (); + hg = hggroup ("__appdata__", struct ("__creator__", "__quiver__")); if (is3d) args = __add_datasource__ ("quiver3", hg, {"x", "y", "z", "u", "v", "w"}, args{:});