Rename 'path' mode to 'fhpath' (freehand path)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@841 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -267,7 +267,7 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
|
|||||||
|
|
||||||
<div id="tools_left" class="tools_panel">
|
<div id="tools_left" class="tools_panel">
|
||||||
<img class="tool_button_current" id="tool_select" src="images/select.png" title="Select Tool [1]" alt="Select"/><br/>
|
<img class="tool_button_current" id="tool_select" src="images/select.png" title="Select Tool [1]" alt="Select"/><br/>
|
||||||
<img class="tool_button" id="tool_path" src="images/path.png" title="Pencil Tool [2]" alt="Pencil"/><br/>
|
<img class="tool_button" id="tool_fhpath" src="images/fhpath.png" title="Pencil Tool [2]" alt="Pencil"/><br/>
|
||||||
<img class="tool_button" id="tool_line" src="images/line.png" title="Line Tool [3]" alt="Line"/><br/>
|
<img class="tool_button" id="tool_line" src="images/line.png" title="Line Tool [3]" alt="Line"/><br/>
|
||||||
<img class="tool_button" id="tools_rect_show" src="images/square.png" title="Square/Rect Tool [4/Shift+4]" alt="Square"/>
|
<img class="tool_button" id="tools_rect_show" src="images/square.png" title="Square/Rect Tool [4/Shift+4]" alt="Square"/>
|
||||||
<img class="flyout_arrow_horiz" src="images/flyouth.png"/>
|
<img class="flyout_arrow_horiz" src="images/flyouth.png"/>
|
||||||
|
|||||||
@@ -562,9 +562,9 @@ function svg_edit_setup() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var clickPath = function() {
|
var clickFHPath = function() {
|
||||||
if (toolButtonClick('#tool_path')) {
|
if (toolButtonClick('#tool_fhpath')) {
|
||||||
svgCanvas.setMode('path');
|
svgCanvas.setMode('fhpath');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -882,7 +882,7 @@ function svg_edit_setup() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#tool_select').click(clickSelect);
|
$('#tool_select').click(clickSelect);
|
||||||
$('#tool_path').click(clickPath);
|
$('#tool_fhpath').click(clickFHPath);
|
||||||
$('#tool_line').click(clickLine);
|
$('#tool_line').click(clickLine);
|
||||||
$('#tool_square').mouseup(clickSquare);
|
$('#tool_square').mouseup(clickSquare);
|
||||||
$('#tool_rect').mouseup(clickRect);
|
$('#tool_rect').mouseup(clickRect);
|
||||||
@@ -971,7 +971,7 @@ function svg_edit_setup() {
|
|||||||
function setKeyBindings() {
|
function setKeyBindings() {
|
||||||
var keys = [
|
var keys = [
|
||||||
['1', clickSelect],
|
['1', clickSelect],
|
||||||
['2', clickPath],
|
['2', clickFHPath],
|
||||||
['3', clickLine],
|
['3', clickLine],
|
||||||
['Shift+4', clickSquare],
|
['Shift+4', clickSquare],
|
||||||
['4', clickRect],
|
['4', clickRect],
|
||||||
|
|||||||
@@ -1534,7 +1534,7 @@ function BatchCommand(text) {
|
|||||||
break;
|
break;
|
||||||
case "fhellipse":
|
case "fhellipse":
|
||||||
case "fhrect":
|
case "fhrect":
|
||||||
case "path":
|
case "fhpath":
|
||||||
started = true;
|
started = true;
|
||||||
start_x = x;
|
start_x = x;
|
||||||
start_y = y;
|
start_y = y;
|
||||||
@@ -2014,7 +2014,7 @@ function BatchCommand(text) {
|
|||||||
freehand_min_y = Math.min(y, freehand_min_y);
|
freehand_min_y = Math.min(y, freehand_min_y);
|
||||||
freehand_max_y = Math.max(y, freehand_max_y);
|
freehand_max_y = Math.max(y, freehand_max_y);
|
||||||
// break; missing on purpose
|
// break; missing on purpose
|
||||||
case "path":
|
case "fhpath":
|
||||||
start_x = x;
|
start_x = x;
|
||||||
start_y = y;
|
start_y = y;
|
||||||
d_attr += + x + "," + y + " ";
|
d_attr += + x + "," + y + " ";
|
||||||
@@ -2600,7 +2600,7 @@ function BatchCommand(text) {
|
|||||||
'height': Math.abs(y-start_y)
|
'height': Math.abs(y-start_y)
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
case "path":
|
case "fhpath":
|
||||||
// Check that the path contains at least 2 points; a degenerate one-point path
|
// Check that the path contains at least 2 points; a degenerate one-point path
|
||||||
// causes problems.
|
// causes problems.
|
||||||
// Webkit ignores how we set the points attribute with commas and uses space
|
// Webkit ignores how we set the points attribute with commas and uses space
|
||||||
|
|||||||
Reference in New Issue
Block a user