Probably fixed issue Issue 421: Canvas background now black

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1251 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-01-20 17:29:41 +00:00
parent 828dfa2f9f
commit 95fd38610f
1 changed files with 9 additions and 9 deletions

View File

@ -85,8 +85,8 @@ function svg_edit_setup() {
var curPrefs = { var curPrefs = {
lang:'en', lang:'en',
iconsize:'m', iconsize:'m',
bg_color:'#FFF', bkgd_color:'#FFF',
bg_url:'', bkgd_url:'',
img_save:'embed' img_save:'embed'
}; };
@ -539,8 +539,8 @@ function svg_edit_setup() {
}); });
}); });
if($.pref('bg_color')) { if($.pref('bkgd_color')) {
setBackground($.pref('bg_color'), $.pref('bg_url')); setBackground($.pref('bkgd_color'), $.pref('bkgd_url'));
} }
if($.pref('img_save')) { if($.pref('img_save')) {
@ -1193,8 +1193,8 @@ function svg_edit_setup() {
// Update background color with current one // Update background color with current one
var blocks = $('#bg_blocks div'); var blocks = $('#bg_blocks div');
var cur_bg = 'cur_background'; var cur_bg = 'cur_background';
var canvas_bg = $.pref('bg_color'); var canvas_bg = $.pref('bkgd_color');
var url = $.pref('bg_url'); var url = $.pref('bkgd_url');
// if(url) url = url[1]; // if(url) url = url[1];
blocks.each(function() { blocks.each(function() {
var blk = $(this); var blk = $(this);
@ -1283,9 +1283,9 @@ function svg_edit_setup() {
}; };
function setBackground(color, url) { function setBackground(color, url) {
if(color == curPrefs.bg_color && url == curPrefs.bg_url) return; if(color == curPrefs.bkgd_color && url == curPrefs.bkgd_url) return;
$.pref('bg_color', color); $.pref('bkgd_color', color);
$.pref('bg_url', url); $.pref('bkgd_url', url);
// This should be done in svgcanvas.js for the borderRect fill // This should be done in svgcanvas.js for the borderRect fill
svgCanvas.setBackground(color, url); svgCanvas.setBackground(color, url);