From ff56e14e64fd4b26c83c1ada5928aee62c68fab4 Mon Sep 17 00:00:00 2001 From: Mark MacKay Date: Thu, 19 Jul 2012 10:38:48 -0500 Subject: [PATCH] switch and cut tools are now working --- editor/svg-editor.html | 2 +- editor/svg-editor.js | 8 ++------ editor/svgedit.compiled.js | 2 +- method-draw/svg-editor.html | 2 +- method-draw/svg-editor.js | 8 ++------ method-draw/svgedit.compiled.js | 2 +- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/editor/svg-editor.html b/editor/svg-editor.html index e3c5df7..714cf77 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -147,7 +147,7 @@ $(function(){
- + diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 3294b25..47e5241 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -4138,17 +4138,13 @@ {sel:'#tool_ungroup', fn: clickGroup, evt: 'click', key: modKey + 'shift+G'}, {sel:'#tool_unlink_use', fn: clickGroup, evt: 'click'}, {sel:'[id^=tool_align]', fn: clickAlign, evt: 'click'}, - {sel:'#tool_switch', fn: clickSwitch, evt: 'click', key: ['shift+x', true]}, {sel:'#tool_undo', fn: clickUndo, evt: 'click', key: modKey + 'z'}, {sel:'#tool_redo', fn: clickRedo, evt: 'click', key: ['y', true]}, {sel:'#tool_canvas_color_menu', fn: clickCanvasColor, evt: 'click'}, - {sel:'#tool_cut', fn: cutSelected, evt: 'click', key: modKey+'x'}, + {sel:'#tool_cut', fn: cutSelected, evt: 'click', key: [modKey+'x', true]}, {sel:'#tool_copy', fn: copySelected, evt: 'click', key: modKey+'c'}, {sel:'#tool_paste', fn: pasteSelected, evt: 'click', key: modKey+'v'}, - - // these two lines are required to make Opera work properly with the flyout mechanism - // {sel:'#tools_rect_show', fn: clickRect, evt: 'click'}, - // {sel:'#tools_ellipse_show', fn: clickEllipse, evt: 'click'}, + {sel:'#tool_switch', fn: clickSwitch, evt: 'click', key: ['x', true]}, {sel:'#tool_bold', fn: clickBold, evt: 'mousedown', key: [modKey + 'B', true]}, {sel:'#tool_italic', fn: clickItalic, evt: 'mousedown', key: [modKey + 'I', true]}, //{sel:'#sidepanel_handle', fn: toggleSidePanel, key: ['X']}, diff --git a/editor/svgedit.compiled.js b/editor/svgedit.compiled.js index 21128c3..551a0ea 100644 --- a/editor/svgedit.compiled.js +++ b/editor/svgedit.compiled.js @@ -499,7 +499,7 @@ key:["R",true],icon:"rect"},{sel:"#tool_ellipse",fn:ra,evt:"mouseup",key:["C",tr {sel:"#tool_open",fn:mc,evt:"mouseup"},{sel:"#tool_import",fn:lc,evt:"mouseup"},{sel:"#tool_source",fn:D,evt:"click",key:[R+"U",true]},{sel:"#tool_wireframe",fn:G,evt:"click"},{sel:"#tool_snap",fn:z,evt:"click"},{sel:"#tool_rulers",fn:F,evt:"click"},{sel:"#tool_source_cancel,#svg_source_overlay,#tool_docprops_cancel,#tool_prefs_cancel",fn:kb,evt:"click",key:["esc",false,false],hidekey:true},{sel:"#tool_source_save",fn:ca,evt:"click"},{sel:"#tool_docprops_save",fn:ta,evt:"click"},{sel:"#tool_docprops", fn:N,evt:"mouseup"},{sel:"#tool_prefs_save",fn:xa,evt:"click"},{sel:"#tool_prefs_option",fn:function(){K();return false},evt:"mouseup"},{sel:"#tool_delete,#tool_delete_multi",fn:Oa,evt:"click",key:["del/backspace",true]},{sel:"#tool_reorient",fn:Sb,evt:"click"},{sel:"#tool_node_link",fn:qb,evt:"click"},{sel:"#tool_node_clone",fn:Ua,evt:"click"},{sel:"#tool_node_delete",fn:kc,evt:"click"},{sel:"#tool_openclose_path",fn:gc,evt:"click"},{sel:"#tool_add_subpath",fn:hc,evt:"click"},{sel:"#tool_move_top", fn:xb,evt:"click",key:R+"shift+up"},{sel:"#tool_move_bottom",fn:Db,evt:"click",key:R+"shift+down"},{sel:"#tool_move_up",fn:pb,evt:"click",key:[R+"up",true]},{sel:"#tool_move_down",fn:Pb,evt:"click",key:[R+"down",true]},{sel:"#tool_topath",fn:Nb,evt:"click"},{sel:"#tool_make_link,#tool_make_link_multi",fn:ac,evt:"click"},{sel:"#tool_clone,#tool_clone_multi",fn:h,evt:"click",key:[R+"D",true]},{sel:"#tool_group",fn:g,evt:"click",key:[R+"G",true]},{sel:"#tool_ungroup",fn:g,evt:"click",key:R+"shift+G"}, -{sel:"#tool_unlink_use",fn:g,evt:"click"},{sel:"[id^=tool_align]",fn:k,evt:"click"},{sel:"#tool_switch",fn:w,evt:"click",key:["shift+x",true]},{sel:"#tool_undo",fn:ub,evt:"click",key:R+"z"},{sel:"#tool_redo",fn:bc,evt:"click",key:["y",true]},{sel:"#tool_canvas_color_menu",fn:A,evt:"click"},{sel:"#tool_cut",fn:Za,evt:"click",key:R+"x"},{sel:"#tool_copy",fn:fb,evt:"click",key:R+"c"},{sel:"#tool_paste",fn:wb,evt:"click",key:R+"v"},{sel:"#tool_bold",fn:oc,evt:"mousedown",key:[R+"B",true]},{sel:"#tool_italic", +{sel:"#tool_unlink_use",fn:g,evt:"click"},{sel:"[id^=tool_align]",fn:k,evt:"click"},{sel:"#tool_undo",fn:ub,evt:"click",key:R+"z"},{sel:"#tool_redo",fn:bc,evt:"click",key:["y",true]},{sel:"#tool_canvas_color_menu",fn:A,evt:"click"},{sel:"#tool_cut",fn:Za,evt:"click",key:[R+"x",true]},{sel:"#tool_copy",fn:fb,evt:"click",key:R+"c"},{sel:"#tool_paste",fn:wb,evt:"click",key:R+"v"},{sel:"#tool_switch",fn:w,evt:"click",key:["x",true]},{sel:"#tool_bold",fn:oc,evt:"mousedown",key:[R+"B",true]},{sel:"#tool_italic", fn:Yb,evt:"mousedown",key:[R+"I",true]},{sel:"#copy_save_done",fn:kb,evt:"click"},{key:"ctrl+left",fn:function(){Tb(0,1)}},{key:"ctrl+right",fn:function(){Tb(1,1)}},{key:"ctrl+shift+left",fn:function(){Tb(0,5)}},{key:"ctrl+shift+right",fn:function(){Tb(1,5)}},{key:"shift+O",fn:ic},{key:"shift+P",fn:ec},{key:[R+"+",true],fn:function(){u(2)}},{key:[R+"-",true],fn:function(){u(0.5)}},{key:["up",true],fn:function(){Lb(0,-1)}},{key:["down",true],fn:function(){Lb(0,1)}},{key:["left",true],fn:function(){Lb(-1, 0)}},{key:["right",true],fn:function(){Lb(1,0)}},{key:"shift+up",fn:function(){Lb(0,-10)}},{key:"shift+down",fn:function(){Lb(0,10)}},{key:"shift+left",fn:function(){Lb(-10,0)}},{key:"shift+right",fn:function(){Lb(10,0)}},{key:["alt+up",true],fn:function(){f.cloneSelectedElements(0,-1)}},{key:["alt+down",true],fn:function(){f.cloneSelectedElements(0,1)}},{key:["alt+left",true],fn:function(){f.cloneSelectedElements(-1,0)}},{key:["alt+right",true],fn:function(){f.cloneSelectedElements(1,0)}},{key:["alt+shift+up", true],fn:function(){f.cloneSelectedElements(0,-10)}},{key:["alt+shift+down",true],fn:function(){f.cloneSelectedElements(0,10)}},{key:["alt+shift+left",true],fn:function(){f.cloneSelectedElements(-10,0)}},{key:["alt+shift+right",true],fn:function(){f.cloneSelectedElements(10,0)}},{key:R+"A",fn:function(){f.selectAllInCurrentLayer()}},{key:R+"shift+z",fn:bc},{key:"esc",fn:C}],B={"4/Shift+4":"#tools_rect_show","5/Shift+5":"#tools_ellipse_show"};return{setAll:function(){var L={};a.each(s,function(W,fa){if(fa.sel){var pa= diff --git a/method-draw/svg-editor.html b/method-draw/svg-editor.html index 8173c1a..21e86f0 100644 --- a/method-draw/svg-editor.html +++ b/method-draw/svg-editor.html @@ -147,7 +147,7 @@ $(function(){
- + diff --git a/method-draw/svg-editor.js b/method-draw/svg-editor.js index 3294b25..47e5241 100644 --- a/method-draw/svg-editor.js +++ b/method-draw/svg-editor.js @@ -4138,17 +4138,13 @@ {sel:'#tool_ungroup', fn: clickGroup, evt: 'click', key: modKey + 'shift+G'}, {sel:'#tool_unlink_use', fn: clickGroup, evt: 'click'}, {sel:'[id^=tool_align]', fn: clickAlign, evt: 'click'}, - {sel:'#tool_switch', fn: clickSwitch, evt: 'click', key: ['shift+x', true]}, {sel:'#tool_undo', fn: clickUndo, evt: 'click', key: modKey + 'z'}, {sel:'#tool_redo', fn: clickRedo, evt: 'click', key: ['y', true]}, {sel:'#tool_canvas_color_menu', fn: clickCanvasColor, evt: 'click'}, - {sel:'#tool_cut', fn: cutSelected, evt: 'click', key: modKey+'x'}, + {sel:'#tool_cut', fn: cutSelected, evt: 'click', key: [modKey+'x', true]}, {sel:'#tool_copy', fn: copySelected, evt: 'click', key: modKey+'c'}, {sel:'#tool_paste', fn: pasteSelected, evt: 'click', key: modKey+'v'}, - - // these two lines are required to make Opera work properly with the flyout mechanism - // {sel:'#tools_rect_show', fn: clickRect, evt: 'click'}, - // {sel:'#tools_ellipse_show', fn: clickEllipse, evt: 'click'}, + {sel:'#tool_switch', fn: clickSwitch, evt: 'click', key: ['x', true]}, {sel:'#tool_bold', fn: clickBold, evt: 'mousedown', key: [modKey + 'B', true]}, {sel:'#tool_italic', fn: clickItalic, evt: 'mousedown', key: [modKey + 'I', true]}, //{sel:'#sidepanel_handle', fn: toggleSidePanel, key: ['X']}, diff --git a/method-draw/svgedit.compiled.js b/method-draw/svgedit.compiled.js index 21128c3..551a0ea 100644 --- a/method-draw/svgedit.compiled.js +++ b/method-draw/svgedit.compiled.js @@ -499,7 +499,7 @@ key:["R",true],icon:"rect"},{sel:"#tool_ellipse",fn:ra,evt:"mouseup",key:["C",tr {sel:"#tool_open",fn:mc,evt:"mouseup"},{sel:"#tool_import",fn:lc,evt:"mouseup"},{sel:"#tool_source",fn:D,evt:"click",key:[R+"U",true]},{sel:"#tool_wireframe",fn:G,evt:"click"},{sel:"#tool_snap",fn:z,evt:"click"},{sel:"#tool_rulers",fn:F,evt:"click"},{sel:"#tool_source_cancel,#svg_source_overlay,#tool_docprops_cancel,#tool_prefs_cancel",fn:kb,evt:"click",key:["esc",false,false],hidekey:true},{sel:"#tool_source_save",fn:ca,evt:"click"},{sel:"#tool_docprops_save",fn:ta,evt:"click"},{sel:"#tool_docprops", fn:N,evt:"mouseup"},{sel:"#tool_prefs_save",fn:xa,evt:"click"},{sel:"#tool_prefs_option",fn:function(){K();return false},evt:"mouseup"},{sel:"#tool_delete,#tool_delete_multi",fn:Oa,evt:"click",key:["del/backspace",true]},{sel:"#tool_reorient",fn:Sb,evt:"click"},{sel:"#tool_node_link",fn:qb,evt:"click"},{sel:"#tool_node_clone",fn:Ua,evt:"click"},{sel:"#tool_node_delete",fn:kc,evt:"click"},{sel:"#tool_openclose_path",fn:gc,evt:"click"},{sel:"#tool_add_subpath",fn:hc,evt:"click"},{sel:"#tool_move_top", fn:xb,evt:"click",key:R+"shift+up"},{sel:"#tool_move_bottom",fn:Db,evt:"click",key:R+"shift+down"},{sel:"#tool_move_up",fn:pb,evt:"click",key:[R+"up",true]},{sel:"#tool_move_down",fn:Pb,evt:"click",key:[R+"down",true]},{sel:"#tool_topath",fn:Nb,evt:"click"},{sel:"#tool_make_link,#tool_make_link_multi",fn:ac,evt:"click"},{sel:"#tool_clone,#tool_clone_multi",fn:h,evt:"click",key:[R+"D",true]},{sel:"#tool_group",fn:g,evt:"click",key:[R+"G",true]},{sel:"#tool_ungroup",fn:g,evt:"click",key:R+"shift+G"}, -{sel:"#tool_unlink_use",fn:g,evt:"click"},{sel:"[id^=tool_align]",fn:k,evt:"click"},{sel:"#tool_switch",fn:w,evt:"click",key:["shift+x",true]},{sel:"#tool_undo",fn:ub,evt:"click",key:R+"z"},{sel:"#tool_redo",fn:bc,evt:"click",key:["y",true]},{sel:"#tool_canvas_color_menu",fn:A,evt:"click"},{sel:"#tool_cut",fn:Za,evt:"click",key:R+"x"},{sel:"#tool_copy",fn:fb,evt:"click",key:R+"c"},{sel:"#tool_paste",fn:wb,evt:"click",key:R+"v"},{sel:"#tool_bold",fn:oc,evt:"mousedown",key:[R+"B",true]},{sel:"#tool_italic", +{sel:"#tool_unlink_use",fn:g,evt:"click"},{sel:"[id^=tool_align]",fn:k,evt:"click"},{sel:"#tool_undo",fn:ub,evt:"click",key:R+"z"},{sel:"#tool_redo",fn:bc,evt:"click",key:["y",true]},{sel:"#tool_canvas_color_menu",fn:A,evt:"click"},{sel:"#tool_cut",fn:Za,evt:"click",key:[R+"x",true]},{sel:"#tool_copy",fn:fb,evt:"click",key:R+"c"},{sel:"#tool_paste",fn:wb,evt:"click",key:R+"v"},{sel:"#tool_switch",fn:w,evt:"click",key:["x",true]},{sel:"#tool_bold",fn:oc,evt:"mousedown",key:[R+"B",true]},{sel:"#tool_italic", fn:Yb,evt:"mousedown",key:[R+"I",true]},{sel:"#copy_save_done",fn:kb,evt:"click"},{key:"ctrl+left",fn:function(){Tb(0,1)}},{key:"ctrl+right",fn:function(){Tb(1,1)}},{key:"ctrl+shift+left",fn:function(){Tb(0,5)}},{key:"ctrl+shift+right",fn:function(){Tb(1,5)}},{key:"shift+O",fn:ic},{key:"shift+P",fn:ec},{key:[R+"+",true],fn:function(){u(2)}},{key:[R+"-",true],fn:function(){u(0.5)}},{key:["up",true],fn:function(){Lb(0,-1)}},{key:["down",true],fn:function(){Lb(0,1)}},{key:["left",true],fn:function(){Lb(-1, 0)}},{key:["right",true],fn:function(){Lb(1,0)}},{key:"shift+up",fn:function(){Lb(0,-10)}},{key:"shift+down",fn:function(){Lb(0,10)}},{key:"shift+left",fn:function(){Lb(-10,0)}},{key:"shift+right",fn:function(){Lb(10,0)}},{key:["alt+up",true],fn:function(){f.cloneSelectedElements(0,-1)}},{key:["alt+down",true],fn:function(){f.cloneSelectedElements(0,1)}},{key:["alt+left",true],fn:function(){f.cloneSelectedElements(-1,0)}},{key:["alt+right",true],fn:function(){f.cloneSelectedElements(1,0)}},{key:["alt+shift+up", true],fn:function(){f.cloneSelectedElements(0,-10)}},{key:["alt+shift+down",true],fn:function(){f.cloneSelectedElements(0,10)}},{key:["alt+shift+left",true],fn:function(){f.cloneSelectedElements(-10,0)}},{key:["alt+shift+right",true],fn:function(){f.cloneSelectedElements(10,0)}},{key:R+"A",fn:function(){f.selectAllInCurrentLayer()}},{key:R+"shift+z",fn:bc},{key:"esc",fn:C}],B={"4/Shift+4":"#tools_rect_show","5/Shift+5":"#tools_ellipse_show"};return{setAll:function(){var L={};a.each(s,function(W,fa){if(fa.sel){var pa=