Rename all script/UI poly elements to path. Add TODOs for localization. Change MIME type of lang.XX.js files to text/javascript to better track in Subversion.

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@842 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-10-18 20:46:32 +00:00
parent 0cdbb8d584
commit e667d63ac8
5 changed files with 276 additions and 256 deletions

View File

@ -57,12 +57,12 @@
{"id":"font_size","title":"Change Font Size"},
{"id":"text","title":"Change text contents"},
{"id":"tool_select","title":"Select Tool [1]"},
{"id":"tool_path","title":"Pencil Tool [2]"},
{"id":"tool_fhpath","title":"Pencil Tool [2]"},
{"id":"tool_line","title":"Line Tool [3]"},
{"id":"tools_rect_show","title":"Square/Rect Tool [4/Shift+4]"},
{"id":"tools_ellipse_show","title":"Ellipse/Circle Tool [5/Shift+5]"},
{"id":"tool_text","title":"Text Tool [6]"},
{"id":"tool_poly","title":"Path Tool [7]"},
{"id":"tool_path","title":"Path Tool [7]"},
{"id":"tool_image","title":"Image Tool [8]"},
{"id":"tool_zoom","title":"Zoom Tool [Ctrl+Up/Down]"},
{"id":"zoom","title":"Change zoom level"},
@ -107,8 +107,8 @@
{"id":"fill_tool_bottom","textContent":"fill:"},
{"id":"stroke_tool_bottom","textContent":"stroke:"},
{"id":"svninfo_dim","textContent":"Canvas Dimensions"},
{"id":"poly_node_x","title":"Change node's x coordinate"},
{"id":"poly_node_y","title":"Change node's y coordinate"},
{"id":"path_node_x","title":"Change node's x coordinate"},
{"id":"path_node_y","title":"Change node's y coordinate"},
{"id":"seg_type","title":"Change Segment type"},
{"id":"straight_segments","textContent":"Straight"},
{"id":"curve_segments","textContent":"Curve"},

View File

@ -261,7 +261,7 @@ div.color_block {
#svg_editor #line_panel,
#svg_editor #image_panel,
#svg_editor #text_panel,
#svg_editor #poly_node_panel {
#svg_editor #path_node_panel {
display: none;
}
@ -280,7 +280,7 @@ div.color_block {
#svg_editor #circle_panel .circle_tool,
#svg_editor #ellipse_panel .ellipse_tool,
#svg_editor #line_panel .line_tool,
#svg_editor #poly_node_panel .poly_node_tool {
#svg_editor #path_node_panel .path_node_tool {
vertical-align:12px;
}

View File

@ -249,13 +249,13 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
<input id="text" class="text_tool" type="text" title="Change text contents" size="35"/>
</div>
<div id="poly_node_panel">
<div id="path_node_panel">
<img class="tool_sep" src="images/sep.png" alt="|"/>
<label class="poly_node_tool">x:</label>
<input id="poly_node_x" class="poly_node_tool attr_changer" title="Change node's x coordinate" size="3" data-attr="x"/>
<label class="poly_node_tool">y:</label>
<input id="poly_node_y" class="poly_node_tool attr_changer" title="Change node's y coordinate" size="3" data-attr="y"/>
<select id="seg_type" class="poly_node_tool" title="Change Segment type">
<label class="path_node_tool">x:</label>
<input id="path_node_x" class="path_node_tool attr_changer" title="Change node's x coordinate" size="3" data-attr="x"/>
<label class="path_node_tool">y:</label>
<input id="path_node_y" class="path_node_tool attr_changer" title="Change node's y coordinate" size="3" data-attr="y"/>
<select id="seg_type" class="path_node_tool" title="Change Segment type">
<option id="straight_segments" selected="selected" value="4">Straight</option>
<option id="curve_segments" value="6">Curve</option>
</select>
@ -274,7 +274,7 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
<img class="tool_button" id="tools_ellipse_show" src="images/circle.png" title="Ellipse/Circle Tool [5/Shift+5]" alt="Circle"/><br/>
<img class="flyout_arrow_horiz" src="images/flyouth.png"/>
<img class="tool_button" id="tool_text" src="images/text.png" title="Text Tool [6]" alt="Text"/>
<img class="tool_button" id="tool_poly" src="images/polygon.png" title="Path Tool [7]" alt="Path"/>
<img class="tool_button" id="tool_path" src="images/polygon.png" title="Path Tool [7]" alt="Path"/>
<img class="tool_button" id="tool_image" src="images/image.png" title="Image Tool [8]" alt="Image"/>
<img class="tool_button" id="tool_zoom" src="images/zoom.png" title="Zoom Tool [Ctrl+Up/Down]" alt="Zoom"/>
</div> <!-- tools_left -->

View File

@ -52,7 +52,7 @@ function svg_edit_setup() {
// upon creation of a text element the editor is switched into
// select mode and this event fires - we need our UI to be in sync
var is_node = selectedElement.id && selectedElement.id.indexOf('polypointgrip') == 0;
var is_node = selectedElement.id && selectedElement.id.indexOf('pathpointgrip') == 0;
if (svgCanvas.getMode() != "multiselect" && !is_node) {
setSelectMode();
@ -198,22 +198,22 @@ function svg_edit_setup() {
return;
}
var is_node = elem ? (elem.id && elem.id.indexOf('polypointgrip') == 0) : false;
var is_node = elem ? (elem.id && elem.id.indexOf('pathpointgrip') == 0) : false;
$('#selected_panel, #multiselected_panel, #g_panel, #rect_panel, #circle_panel,\
#ellipse_panel, #line_panel, #text_panel, #image_panel, #poly_node_panel').hide();
#ellipse_panel, #line_panel, #text_panel, #image_panel, #path_node_panel').hide();
if (elem != null) {
$('#angle').val(svgCanvas.getRotationAngle(elem));
if(!is_node) {
$('#selected_panel').show();
} else {
$('#poly_node_panel').show();
$('#path_node_panel').show();
var point = svgCanvas.getNodePoint();
if(point) {
var seg_type = $('#seg_type');
$('#poly_node_x').val(point.x);
$('#poly_node_y').val(point.y);
$('#path_node_x').val(point.x);
$('#path_node_y').val(point.y);
if(point.type) {
seg_type.val(point.type).removeAttr('disabled');
} else {
@ -646,9 +646,9 @@ function svg_edit_setup() {
svgCanvas.setMode('text');
};
var clickPoly = function(){
toolButtonClick('#tool_poly');
svgCanvas.setMode('poly');
var clickPath = function(){
toolButtonClick('#tool_path');
svgCanvas.setMode('path');
};
// Delete is a contextual tool that only appears in the ribbon if
@ -677,15 +677,15 @@ function svg_edit_setup() {
}
};
var clonePolyNode = function() {
var clonePathNode = function() {
if (svgCanvas.getNodePoint()) {
svgCanvas.clonePolyNode();
svgCanvas.clonePathNode();
}
};
var deletePolyNode = function() {
var deletePathNode = function() {
if (svgCanvas.getNodePoint()) {
svgCanvas.deletePolyNode();
svgCanvas.deletePathNode();
}
};
@ -894,7 +894,7 @@ function svg_edit_setup() {
$('#tool_zoom').mouseup(clickZoom);
$('#tool_zoom').dblclick(dblclickZoom);
$('#tool_text').click(clickText);
$('#tool_poly').click(clickPoly);
$('#tool_path').click(clickPath);
$('#tool_clear').click(clickClear);
$('#tool_save').click(clickSave);
$('#tool_open').click(clickOpen);
@ -905,8 +905,8 @@ function svg_edit_setup() {
$('#tool_docprops').click(showDocProperties);
$('#tool_delete').click(deleteSelected);
$('#tool_delete_multi').click(deleteSelected);
$('#tool_node_clone').click(clonePolyNode);
$('#tool_node_delete').click(deletePolyNode);
$('#tool_node_clone').click(clonePathNode);
$('#tool_node_delete').click(deletePathNode);
$('#tool_move_top').click(moveToTopSelected);
$('#tool_move_bottom').click(moveToBottomSelected);
$('#tool_undo').click(clickUndo);
@ -978,7 +978,7 @@ function svg_edit_setup() {
['Shift+5', clickCircle],
['5', clickEllipse],
['6', clickText],
['7', clickPoly],
['7', clickPath],
['8', clickImage],
[modKey+'N', function(evt){clickClear();evt.preventDefault();}],
[modKey+'S', function(evt){editingsource?saveSourceEditor():clickSave();evt.preventDefault();}],

File diff suppressed because it is too large Load Diff