fixtransforms branch: Made point-based elements remap instead of use matrix(), also added possible fix for r357

git-svn-id: http://svg-edit.googlecode.com/svn/branches/fixtransforms@1057 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-12-17 18:16:00 +00:00
parent 729900d796
commit 0baff00fd5
1 changed files with 22 additions and 24 deletions

View File

@ -15,26 +15,7 @@
* ensure zooming works properly
* ensure undo/redo works perfectly
*/
/*
TODOs for Localizing:
- rename tool_path to tool_fhpath in all localization files (already updated in UI and script)
- rename tool_poly to tool_path in all localization files (already updated in UI and script)
- rename poly_node_x to path_node_x globally
- rename poly_node_y to path_node_y globally
- rename svninfo_dim to svginfo_dim globally (typo)
- provide translations in all other non-EN lang.XX.js files for:
- path_node_x
- path_node_y
- seg_type
- straight_segments
- curve_segments
- tool_node_clone
- tool_node_delete
- selLayerLabel
- selLayerNames
- sidepanel_handle
*/
var isWebkit = navigator.userAgent.indexOf("AppleWebKit") != -1;
if(!window.console) {
window.console = {};
@ -1664,12 +1645,29 @@ function BatchCommand(text) {
var angle = canvas.getRotationAngle(child);
if(angle || hasMatrixTransform(childTlist)) {
var em = matrixMultiply(tm, sm, tmn, m);
// this does not appear to work, something wrong with my logic here
var e2t = svgroot.createSVGTransform();
e2t.setMatrix(em);
childTlist.clear();
childTlist.appendItem(e2t,0);
// Remap all point-based elements
var ch = {};
switch (child.tagName) {
case 'line':
ch.x1 = child.getAttribute("x1");
ch.y1 = child.getAttribute("y1");
ch.x2 = child.getAttribute("x2");
ch.y2 = child.getAttribute("y2");
case 'polyline':
case 'polygon':
ch.points = child.getAttribute("points");
case 'path':
ch.d = child.getAttribute("d");
remapElement(child, ch, em);
childTlist.clear();
default:
break;
}
}
// if not rotated or skewed, push the [T][S][-T] down to the child
else {
@ -5610,7 +5608,7 @@ function BatchCommand(text) {
}
};
$(container).mouseup(mouseUp);
$(window).mouseup(mouseUp);
$(container).mousedown(mouseDown);
$(container).mousemove(mouseMove);