Strict Standards: Only variables should be passed by reference in /home/abeall/public_html/fireworks/download.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /home/abeall/public_html/fireworks/download.php:28) in /home/abeall/public_html/fireworks/download.php on line 44
// Fireworks JavaScript Command // Reverse the node order of all selected paths // Install by copying to Fireworks/Configuration/Commands/ // Run in Fireworks via the Commands menu // Aaron Beall 2007-2011 - http://fireworks.abeall.com // Version 1.1 /* TODO - [DONE-v1.1] apply to only selected contours, ie Reverse Countour Direction - [FIXED-v1.1] isCurvePoint is not inherited */ var dom = fw.selection ? fw.getDocumentDOM() : false; // document object var sel = new Array().concat(fw.selection); function ReversePathDirection(){ var paths = []; for(var s in sel){ if(sel[s] == "[object Path]") paths.push(sel[s]); } if(!paths.length) return alert("This command requires a selection of one or more paths. It will reverse the node order of all paths."); var nodes, node, newNode, newNodes, selectedNodes; var subselect = fw.activeTool == 'Subselection', reversed; for(var p in paths){ for(var c in paths[p].contours){ nodes = paths[p].contours[c].nodes; selectedNodes = []; if(subselect){ selected = false; for(var n in nodes){ if(nodes[n].isSelectedPoint){ selectedNodes[n] = true; //break; } } if(!selectedNodes.length) continue; } newNodes = []; for(var n in nodes){ node = nodes[n]; newNode = { x:node.x, y:node.y, predX:node.succX, predY:node.succY, succX:node.predX, succY:node.predY, isCurvePoint:node.isCurvePoint }; newNodes.push(newNode); } for(var n in nodes){ node = nodes[n]; newNode = newNodes.pop(); node.x = newNode.x; node.y = newNode.y; node.predX = newNode.predX; node.predY = newNode.predY; node.succX = newNode.succX; node.succY = newNode.succY; node.isCurvePoint = newNode.isCurvePoint; node.isSelectedPoint = selectedNodes[nodes.length-1-n] ? true : false; } reversed = true; } } if(subselect && !reversed) alert("This operation produced no output; when using the Subselect tool you must select at least one point on a contour to reverse all points on that contour -- or select the entire object using the Pointer tool to reverse all contours."); return true; } ReversePathDirection();