Fixed wireframe mode for blurry elements, added partial undo functionality

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1509 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-04-06 20:16:07 +00:00
parent 66c5cb4866
commit 30e8bc486c
3 changed files with 13 additions and 6 deletions

View File

@@ -398,6 +398,7 @@
opacity: 1;
pointer-events: stroke;
vector-effect: non-scaling-stroke;
filter: none;
}
#workarea.wireframe #svgcontent text {

View File

@@ -1298,13 +1298,13 @@
svgCanvas.setOpacity(val/100);
}
var changeBlur = function(ctl, val) {
var changeBlur = function(ctl, val, noUndo) {
if(val == null) val = ctl.value;
$('#blur').val(val);
if(!ctl || !ctl.handle) {
$('#blur_slider').slider('option', 'value', val);
}
svgCanvas.setBlur(val);
svgCanvas.setBlur(val, noUndo);
}
var operaRepaint = function() {
@@ -1690,12 +1690,13 @@
$("#blur_slider").slider({
max: 10,
step: .1,
stop: function() {
stop: function(evt, ui) {
changeBlur(ui);
$('#blur_dropdown li').show();
$(window).mouseup();
},
slide: function(evt, ui){
changeBlur(ui);
changeBlur(ui, null, true);
}
});

View File

@@ -7100,7 +7100,7 @@ function BatchCommand(text) {
return val;
}
this.setBlur = function(val) {
this.setBlur = function(val, noUndo) {
// Looks for associated blur, creates one if not found
var elem_id = selectedElements[0].id;
var filter = getElem(elem_id + '_blur');
@@ -7112,7 +7112,12 @@ function BatchCommand(text) {
if(val === 0) {
$(filter).remove();
} else {
filter.firstChild.setAttribute('stdDeviation', val);
var elem = filter.firstChild;
if(noUndo) {
this.changeSelectedAttributeNoUndo('stdDeviation', val, [elem]);
} else {
this.changeSelectedAttribute('stdDeviation', val, [elem]);
}
}
} else {
// Not found, so create