Fix Issue 433: If fill is not present, assume 'black' as per SVG spec

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1264 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2010-01-21 02:02:04 +00:00
parent e2f7aa9d96
commit 05941d2a13
1 changed files with 7 additions and 7 deletions

View File

@ -231,15 +231,15 @@ function svg_edit_setup() {
}; };
var zoomChanged = function(window, bbox, autoCenter) { var zoomChanged = function(window, bbox, autoCenter) {
var scrbar = 15; var scrbar = 15,
var res = svgCanvas.getResolution(); res = svgCanvas.getResolution(),
var w_area = workarea; w_area = workarea,
var canvas_pos = $('#svgcanvas').position(); canvas_pos = $('#svgcanvas').position();
w_area.css('cursor','auto'); w_area.css('cursor','auto');
var z_info = svgCanvas.setBBoxZoom(bbox, w_area.width()-scrbar, w_area.height()-scrbar); var z_info = svgCanvas.setBBoxZoom(bbox, w_area.width()-scrbar, w_area.height()-scrbar);
if(!z_info) return; if(!z_info) return;
var zoomlevel = z_info.zoom; var zoomlevel = z_info.zoom,
var bb = z_info.bbox; bb = z_info.bbox;
$('#zoom').val(Math.round(zoomlevel*100)); $('#zoom').val(Math.round(zoomlevel*100));
if(autoCenter) { if(autoCenter) {
@ -273,7 +273,7 @@ function svg_edit_setup() {
} }
// update fill color and opacity // update fill color and opacity
var fillColor = selectedElement.getAttribute("fill")||"none"; var fillColor = selectedElement.getAttribute("fill")||"black";
// prevent undo on these canvas changes // prevent undo on these canvas changes
svgCanvas.setFillColor(fillColor, true); svgCanvas.setFillColor(fillColor, true);
svgCanvas.setFillOpacity(fillOpacity, true); svgCanvas.setFillOpacity(fillOpacity, true);