Fixed issue 377: Raster images don't invert
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1790 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
89a918a4f0
commit
ddbbd53bf6
|
@ -3038,6 +3038,16 @@ var remapElement = this.remapElement = function(selected,changes,m) {
|
|||
case "foreignObject":
|
||||
case "rect":
|
||||
case "image":
|
||||
|
||||
// Allow images to be inverted (give them matrix when flipped)
|
||||
if(elName === 'image' && (m.a < 0 || m.d < 0)) {
|
||||
// Convert to matrix
|
||||
var chlist = getTransformList(selected);
|
||||
var mt = svgroot.createSVGTransform();
|
||||
mt.setMatrix(matrixMultiply(transformListToTransform(chlist).matrix,m));
|
||||
chlist.clear();
|
||||
chlist.appendItem(mt);
|
||||
} else {
|
||||
var pt1 = remap(changes.x,changes.y);
|
||||
|
||||
changes.width = scalew(changes.width);
|
||||
|
@ -3047,6 +3057,7 @@ var remapElement = this.remapElement = function(selected,changes,m) {
|
|||
changes.y = pt1.y + Math.min(0,changes.height);
|
||||
changes.width = Math.abs(changes.width);
|
||||
changes.height = Math.abs(changes.height);
|
||||
}
|
||||
finishUp();
|
||||
break;
|
||||
case "ellipse":
|
||||
|
|
Loading…
Reference in New Issue