Added wireframe mode - Issue 106

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@857 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-10-21 13:40:50 +00:00
parent e253f48991
commit d7b4958559
4 changed files with 23 additions and 0 deletions

BIN
editor/images/wireframe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

View File

@ -246,6 +246,21 @@ body {
left: 2px;
}
#workarea.wireframe #svgzoom * {
fill: none;
stroke: #000;
stroke-width: 1px;
stroke-opacity: 1.0;
stroke-dasharray: none;
opacity: 1;
pointer-events: stroke;
}
#workarea.wireframe #svgzoom text {
fill: #000;
stroke: none;
}
/* TODO: fix this */
div.color_block {
background-image: url('images/none.png');

View File

@ -89,6 +89,7 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
<img class="push_button" id="tool_save" src="images/save.png" title="Save Image [S]" alt="Save"/>
<img class="push_button" id="tool_docprops" src="images/document-properties.png" title="Document Properties [I]"/>
<img class="push_button" id="tool_source" src="images/source.png" title="Edit Source [U]" alt="Source"/>
<img class="tool_button" id="tool_wireframe" src="images/wireframe.png" title="Wireframe Mode [F]" alt="Wireframe"/>
</div>
<!-- History buttons -->

View File

@ -807,6 +807,11 @@ function svg_edit_setup() {
svgCanvas.setZoom(multiplier);
};
var clickWireframe = function() {
$('#tool_wireframe').toggleClass('push_button_pressed');
$('#workarea').toggleClass('wireframe');
}
var showSourceEditor = function(){
if (editingsource) return;
editingsource = true;
@ -923,6 +928,7 @@ function svg_edit_setup() {
$('#tool_save').click(clickSave);
$('#tool_open').click(clickOpen);
$('#tool_source').click(showSourceEditor);
$('#tool_wireframe').click(clickWireframe);
$('#tool_source_cancel,#svg_source_overlay,#tool_docprops_cancel').click(cancelOverlays);
$('#tool_source_save').click(saveSourceEditor);
$('#tool_docprops_save').click(saveDocProperties);
@ -1027,6 +1033,7 @@ function svg_edit_setup() {
[modKey+'i', function(evt){showDocProperties();evt.preventDefault();}],
[modKey+'c', function(evt){clickClone();evt.preventDefault();}],
[modKey+'g', function(evt){clickGroup();evt.preventDefault();}],
[modKey+'f', function(evt){clickWireframe();evt.preventDefault();}],
[modKey+'x', function(evt){toggleSidePanel();}],
['esc', cancelOverlays, false],
];