Mercurial > hg > octave-nkf
changeset 20092:65e6207f7ae4
Fix FLTK Edit uimenu to use new pan/rotate3d fcns and mousewheelzoom property.
* __add_default_menu__.m (__get_axes__): Return axes and figure handle.
* __add_default_menu__.m (guimode_cb): Use figure handle for pan and rotate.
Use new property mousewheelzoom.
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Mon, 02 Mar 2015 14:51:23 +0100 |
parents | b403780efe90 |
children | e814e202cd84 |
files | scripts/plot/util/private/__add_default_menu__.m |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/private/__add_default_menu__.m +++ b/scripts/plot/util/private/__add_default_menu__.m @@ -86,7 +86,7 @@ endfunction -function hax = __get_axes__ (h) +function [hax, fig] = __get_axes__ (h) ## Get parent figure fig = ancestor (h, "figure"); @@ -113,23 +113,23 @@ endfunction function guimode_cb (h, e) - hax = __get_axes__ (h); + [hax, fig] = __get_axes__ (h); id = get (h, "tag"); switch (id) case "pan_on" - arrayfun (@(h) pan (h, "on"), hax) + pan (fig, "on") case "pan_xon" - arrayfun (@(h) pan (h, "xon"), hax) + pan (fig, "xon") case "pan_yon" - arrayfun (@(h) pan (h, "yon"), hax) + pan (fig, "yon") case "rotate3d" - arrayfun (@(h) rotate3d (h, "on"), hax) + rotate3d (fig, "on") case "no_pan_rotate" - arrayfun (@(h) pan (h, "off"), hax) - arrayfun (@(h) rotate3d (h, "off"), hax) + pan (fig, "off") + rotate3d (fig, "off") case "zoom_on" - arrayfun (@(h) set (h, "mouse_wheel_zoom", 0.05), hax); + arrayfun (@(h) set (h, "mousewheelzoom", 0.05), hax); case "zoom_off" - arrayfun (@(h) set (h, "mouse_wheel_zoom", 0.0), hax); + arrayfun (@(h) set (h, "mousewheelzoom", 0.0), hax); endswitch endfunction