diff --git a/pd/nw/css/default.css b/pd/nw/css/default.css index 66f9d8068c0db69f1d514ba96101ee1c4fb68191..dd1dde8d5f60ffdeecb71e8b81881a8d76eb3d46 100644 --- a/pd/nw/css/default.css +++ b/pd/nw/css/default.css @@ -320,9 +320,10 @@ text { //cursor: default; } -/* not sure if this is still needed */ +/* not sure if this is still needed... + updated the coloring just in case */ .selected_border { - stroke: blue; + stroke: #e87216; stroke-dasharray: none; stroke-width: 1; } @@ -399,6 +400,12 @@ text { stroke-dasharray: 3 2; } +/* ico@vt.edu: added selected border coloring + in edit mode only */ +#patchsvg.editmode .comment.selected .border { + stroke: #e87216; +} + /* A little hack for special case of [cnv]. All other iemguis have a black border, but [cnv] sets its selection rectangle to the @@ -426,14 +433,17 @@ text { in plain English: This lets us highlight an object's border, unless it is inside a gop canvas. + + ico@vt.edu added selection highlight only if we are in editmode */ -:not(.gop).selected .border { +#patchsvg.editmode :not(.gop).selected .border { stroke: #e87216; display: inline; } -/* text inside selected objects */ -:not(.gop).selected text { +/* text inside selected objects + ico@vt.edu added selection highlight only if we are in editmode */ +#patchsvg.editmode :not(.gop).selected text { fill: #e87216; } diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js index 6009838e427c97d726d8208a2125975d93411035..2ef557b5fd990ed2b4c9a4f244bb9db97bde0941 100644 --- a/pd/nw/pd_canvas.js +++ b/pd/nw/pd_canvas.js @@ -332,8 +332,7 @@ var canvas_events = (function() { pdgui.keydown(name, evt); // prevent the default behavior of scrolling // on arrow keys in editmode - if (document.querySelector("#patchsvg") - .classList.contains("editmode")) { + if (document.querySelector("#patchsvg")) { if ([32, 37, 38, 39, 40].indexOf(evt.keyCode) > -1) { evt.preventDefault(); } diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index d0f28722d6a561076bf1311e5dd57c8da35bcb76..e7f295e940b9c2dce85db8365fca6f9bcfb4fa1f 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -5093,6 +5093,7 @@ void canvas_key(t_canvas *x, t_symbol *s, int ac, t_atom *av) { gotkeysym = av[1].a_w.w_symbol; //fprintf(stderr,"gotkeysym=%s\n", gotkeysym->s_name); + //post("key: %d %s", keynum, gotkeysym->s_name); } else if (av[1].a_type == A_FLOAT) { @@ -5282,7 +5283,12 @@ void canvas_key(t_canvas *x, t_symbol *s, int ac, t_atom *av) { //fprintf(stderr,"ctrl\n"); glob_ctrl = down; - if (x->gl_edit && x->gl_editor->e_onmotion == MA_NONE) + //post("glob_ctrl=%d", down); + /* ico@vt.edu: commenting MA_NONE part as that prevents the patch + from assuming editmode after it has had an object added via + a ctrl+(1-5) shortcut while not in edit mode + */ + if (x->gl_edit /*&& x->gl_editor->e_onmotion == MA_NONE*/) { canvas_setcursor(x, down ? CURSOR_RUNMODE_NOTHING : CURSOR_EDITMODE_NOTHING);