# HG changeset patch # User Rik # Date 1380661751 25200 # Node ID 76614e624818cc513eb6b65f530723f2a0535bc3 # Parent 4f1dd8a980df91f6fa2c259c1458ef5c5cb79625 Add "HitTestArea" property to certain hggroups for Matlab compatibility * scripts/plot/area.m, scripts/plot/private/__bar__.m, scripts/plot/private/__contour__.m, scripts/plot/private/__errplot__.m, scripts/plot/private/__quiver__.m, scripts/plot/private/__scatter__.m, scripts/plot/private/__stem__.m, scripts/plot/stairs.m: Add "HitTestArea" property for Matlab compatibility. Octave doesn't do anything with the property though. diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/area.m --- a/scripts/plot/area.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/area.m Tue Oct 01 14:09:11 2013 -0700 @@ -176,6 +176,9 @@ addproperty ("areagroup", hg, "data"); set (retval, "areagroup", retval); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + if (! isempty (args)) set (hg, args{:}); endif diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/private/__bar__.m --- a/scripts/plot/private/__bar__.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/private/__bar__.m Tue Oct 01 14:09:11 2013 -0700 @@ -319,6 +319,10 @@ addproperty ("bargroup", hg, "data"); set (hglist, "bargroup", hglist); + + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + if (! isempty (args)) set (hg, args{:}); endif diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/private/__contour__.m --- a/scripts/plot/private/__contour__.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/private/__contour__.m Tue Oct 01 14:09:11 2013 -0700 @@ -165,6 +165,9 @@ addproperty ("linestyle", hg, "linelinestyle", linespec.linestyle); addproperty ("linewidth", hg, "linelinewidth", 0.5); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + addlistener (hg, "fill", {@update_data, "fill"}); addlistener (hg, "zlevelmode", @update_zlevel); diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/private/__errplot__.m --- a/scripts/plot/private/__errplot__.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/private/__errplot__.m Tue Oct 01 14:09:11 2013 -0700 @@ -169,6 +169,9 @@ addproperty ("markersize", hg, "linemarkersize", get (hl(1), "markersize")); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + fcn = {@update_props, hl}; addlistener (hg, "color", fcn); addlistener (hg, "linestyle", fcn); diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/private/__quiver__.m --- a/scripts/plot/private/__quiver__.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/private/__quiver__.m Tue Oct 01 14:09:11 2013 -0700 @@ -320,6 +320,9 @@ addlistener (hg, "markerfacecolor", @update_props); addlistener (hg, "markersize", @update_props); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + if (! isempty (args)) set (hg, args{:}); endif diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/private/__scatter__.m --- a/scripts/plot/private/__scatter__.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/private/__scatter__.m Tue Oct 01 14:09:11 2013 -0700 @@ -259,6 +259,9 @@ addlistener (hg, "markerfacecolor", @update_props); addlistener (hg, "markeredgecolor", @update_props); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + if (! isempty (newargs)) set (hg, newargs{:}); endif diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/private/__stem__.m --- a/scripts/plot/private/__stem__.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/private/__stem__.m Tue Oct 01 14:09:11 2013 -0700 @@ -143,6 +143,9 @@ addlistener (hg, "ydata", @update_data); addlistener (hg, "zdata", @update_data); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + if (! isempty (args)) set (hg, args{:}); endif diff -r 4f1dd8a980df -r 76614e624818 scripts/plot/stairs.m --- a/scripts/plot/stairs.m Tue Oct 01 13:50:08 2013 -0700 +++ b/scripts/plot/stairs.m Tue Oct 01 14:09:11 2013 -0700 @@ -218,6 +218,9 @@ addlistener (hg, "markerfacecolor", @update_props); addlistener (hg, "markersize", @update_props); + ## Matlab property, although Octave does not implement it. + addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); + if (! isempty (args)) set (hg, args{:}); endif