From 80696e17eb6f22a5035958456d43a7417dab2bc3 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Fri, 23 Oct 2009 17:27:37 +0000 Subject: [PATCH] Fixed issue 292: Change the color of the handles of the segment selected in pathedit mode git-svn-id: http://svg-edit.googlecode.com/svn/trunk@875 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index a0fec99b..7eeafea3 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1535,6 +1535,9 @@ function BatchCommand(text) { $('#pathpointgrip_container circle').attr('stroke','#00F'); var grip = $('#pathpointgrip_' + point).attr('stroke','#0FF'); + $('#ctrlpointgrip_container circle').attr('fill', '#EEE'); + $('#ctrlpointgrip_' + current_path_pt + 'c1, #ctrlpointgrip_' + current_path_pt + 'c2').attr('fill','#0FF'); + updateSegLine(); updateSegLine(true); @@ -1821,6 +1824,8 @@ function BatchCommand(text) { updateSegLine(); } else if(id.indexOf("ctrlpointgrip_") == 0) { current_ctrl_pt_drag = id.split('_')[1]; + var node_num = current_ctrl_pt_drag.split('c')[0]-0; + canvas.addNodeToSelection(node_num); } if(current_path_pt_drag == -1 && current_ctrl_pt_drag == -1) { @@ -2198,8 +2203,7 @@ function BatchCommand(text) { var shortFloat = function(val) { var digits = 5; if(!isNaN(val)) { - val = Number(val); - return Number(val.toFixed(digits)); + return Number(Number(val).toFixed(digits)); } else if($.isArray(val)) { return shortFloat(val[0]) + ',' + shortFloat(val[1]); } @@ -2724,7 +2728,7 @@ function BatchCommand(text) { 'id': "ctrlpointgrip_" + id, 'display': "none", 'r': 4, - 'fill': "#AAA", + 'fill': "#0FF", 'stroke': "#55F", 'stroke-width': 1, 'cursor': 'move',