Fixed bugs in Opera 10.10 and some Opera/Win/Non-EN bugs by reverting part of r838 and using our own transformlist implementation
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1129 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
0ed21291b9
commit
0beb2f19a2
|
@ -495,7 +495,6 @@ function svg_edit_setup() {
|
|||
else {
|
||||
$('#selLayerNames').attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$('#text').focus( function(){ textBeingEntered = true; } );
|
||||
|
@ -1591,6 +1590,11 @@ function svg_edit_setup() {
|
|||
$(button).removeClass('tool_button_disabled').addClass('tool_button');
|
||||
}
|
||||
}
|
||||
|
||||
if(window.opera) {
|
||||
// Fix repaint bug for Opera
|
||||
$('<p/>').hide().appendTo('body').remove();
|
||||
}
|
||||
};
|
||||
|
||||
// set up gradients to be used for the buttons
|
||||
|
|
|
@ -3028,21 +3028,26 @@ function BatchCommand(text) {
|
|||
}
|
||||
break;
|
||||
case "line":
|
||||
keep = (element.x1.baseVal.value != element.x2.baseVal.value ||
|
||||
element.y1.baseVal.value != element.y2.baseVal.value);
|
||||
// keep = (element.x1.baseVal.value != element.x2.baseVal.value ||
|
||||
// element.y1.baseVal.value != element.y2.baseVal.value);
|
||||
keep = (element.getAttribute('x1') != element.getAttribute('x2') || element.getAttribute('y1') != element.getAttribute('y2'));
|
||||
break;
|
||||
case "square":
|
||||
case "rect":
|
||||
keep = (element.width.baseVal.value && element.height.baseVal.value);
|
||||
// keep = (element.width.baseVal.value && element.height.baseVal.value);
|
||||
keep = (element.getAttribute('width') != 0 || element.getAttribute('height') != 0);
|
||||
break;
|
||||
case "image":
|
||||
keep = (element.width.baseVal.value && element.height.baseVal.value);
|
||||
// keep = (element.width.baseVal.value && element.height.baseVal.value);
|
||||
keep = (element.getAttribute('width') != 0 || element.getAttribute('height') != 0);
|
||||
break;
|
||||
case "circle":
|
||||
keep = (element.r.baseVal.value);
|
||||
// keep = (element.r.baseVal.value);
|
||||
keep = (element.getAttribute('r') != 0);
|
||||
break;
|
||||
case "ellipse":
|
||||
keep = (element.rx.baseVal.value && element.ry.baseVal.value);
|
||||
// keep = (element.rx.baseVal.value && element.ry.baseVal.value);
|
||||
keep = (element.getAttribute('rx') != null || element.getAttribute('ry') != null);
|
||||
break;
|
||||
case "fhellipse":
|
||||
if ((freehand.maxx - freehand.minx) > 0 &&
|
||||
|
@ -5579,7 +5584,9 @@ function BatchCommand(text) {
|
|||
|
||||
// returns an object that behaves like a SVGTransformList
|
||||
this.getTransformList = function(elem) {
|
||||
if (isWebkit) {
|
||||
// Opera is included here because Opera/Win/Non-EN seems to change
|
||||
// transformlist float vals to use a comma rather than a period.
|
||||
if (isWebkit || isOpera) {
|
||||
var t = svgTransformLists[elem.id];
|
||||
if (!t) {
|
||||
svgTransformLists[elem.id] = new SVGEditTransformList(elem);
|
||||
|
@ -5662,13 +5669,13 @@ function BatchCommand(text) {
|
|||
tlist.removeItem(0);
|
||||
}
|
||||
}
|
||||
|
||||
// find R_nc and insert it
|
||||
if (val != 0) {
|
||||
var center = transformPoint(cx,cy,transformListToTransform(tlist).matrix);
|
||||
var R_nc = svgroot.createSVGTransform();
|
||||
R_nc.setRotate(val, center.x, center.y);
|
||||
tlist.insertItemBefore(R_nc,0);
|
||||
opera.postError(elem.getAttribute("transform"))
|
||||
}
|
||||
else if (tlist.numberOfItems == 0) {
|
||||
elem.removeAttribute("transform");
|
||||
|
|
Loading…
Reference in New Issue