Fixed path reorient enable/disable state, fixed fill/stroke color box gap

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1120 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-12-28 19:57:46 +00:00
parent 81560a70eb
commit ccc0c38887
1 changed files with 6 additions and 1 deletions

View File

@ -350,7 +350,9 @@ function svg_edit_setup() {
var currentMode = svgCanvas.getMode(); var currentMode = svgCanvas.getMode();
// No need to update anything else in rotate mode // No need to update anything else in rotate mode
if (currentMode == 'rotate' && elem != null) { if (currentMode == 'rotate' && elem != null) {
$('#angle').val(svgCanvas.getRotationAngle(elem)); var ang = svgCanvas.getRotationAngle(elem);
$('#angle').val(ang);
$('#tool_reorient').toggleClass('tool_button_disabled', ang == 0);
return; return;
} else if(svgCanvas.addedNew && elem != null && elname == 'image') { } else if(svgCanvas.addedNew && elem != null && elname == 'image') {
promptImgURL(); promptImgURL();
@ -552,6 +554,7 @@ function svg_edit_setup() {
var changeRotationAngle = function(ctl) { var changeRotationAngle = function(ctl) {
svgCanvas.setRotationAngle(ctl.value); svgCanvas.setRotationAngle(ctl.value);
$('#tool_reorient').toggleClass('tool_button_disabled', ctl.value == 0);
} }
var changeZoom = function(ctl) { var changeZoom = function(ctl) {
var zoomlevel = ctl.value / 100; var zoomlevel = ctl.value / 100;
@ -1592,9 +1595,11 @@ function svg_edit_setup() {
var boxgrad = svgdocbox.getElementById('gradbox_'); var boxgrad = svgdocbox.getElementById('gradbox_');
boxgrad.id = 'gradbox_fill'; boxgrad.id = 'gradbox_fill';
svgdocbox.documentElement.setAttribute('width',16.5);
$('#fill_color').append( document.importNode(svgdocbox.documentElement,true) ); $('#fill_color').append( document.importNode(svgdocbox.documentElement,true) );
boxgrad.id = 'gradbox_stroke'; boxgrad.id = 'gradbox_stroke';
svgdocbox.documentElement.setAttribute('width',16.5);
$(svgdocbox.documentElement.firstChild).attr('fill', '#000000'); $(svgdocbox.documentElement.firstChild).attr('fill', '#000000');
$('#stroke_color').append( document.importNode(svgdocbox.documentElement,true) ); $('#stroke_color').append( document.importNode(svgdocbox.documentElement,true) );