Fixed issue 154: Cannot set Text stroke to 0 after it has been changed to non-zero

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@521 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2009-09-01 19:52:34 +00:00
parent 3557a0a94b
commit 4225c9e318
2 changed files with 16 additions and 4 deletions

View File

@@ -261,7 +261,13 @@ function svg_edit_setup() {
}
var changeStrokeWidth = function(ctl) {
svgCanvas.setStrokeWidth(ctl.value);
var val = ctl.value;
if(val == 0 && selectedElement && $.inArray(selectedElement.nodeName, ['line', 'polyline']) != -1) {
console.log('1');
val = 1;
ctl.value = 1;
}
svgCanvas.setStrokeWidth(val);
}
var changeRotationAngle = function(ctl) {
@@ -909,7 +915,7 @@ function svg_edit_setup() {
});
$('#rect_rx').SpinButton({ min: 0, max: 1000, step: 1, callback: changeRectRadius });
$('#stroke_width').SpinButton({ min: 1, max: 99, step: 1, callback: changeStrokeWidth });
$('#stroke_width').SpinButton({ min: 0, max: 99, step: 1, callback: changeStrokeWidth });
$('#angle').SpinButton({ min: -180, max: 180, step: 5, callback: changeRotationAngle });
svgCanvas.setCustomHandlers = function(opts) {