formatting

master
ibrierley 2015-07-06 12:42:25 +02:00
parent 92caa0a8d7
commit 7d278dbfd8
1 changed files with 4 additions and 1 deletions

View File

@ -139,6 +139,7 @@ svgedit.path.getPointFromGrip = function(pt, path) {
svgedit.path.addPointGrip = function(index, x, y) { svgedit.path.addPointGrip = function(index, x, y) {
// create the container of all the point grips // create the container of all the point grips
var pointGripContainer = svgedit.path.getGripContainer(); var pointGripContainer = svgedit.path.getGripContainer();
var pointGrip = svgedit.utilities.getElem('pathpointgrip_'+index); var pointGrip = svgedit.utilities.getElem('pathpointgrip_'+index);
// create it // create it
if (!pointGrip) { if (!pointGrip) {
@ -207,6 +208,7 @@ svgedit.path.addCtrlGrip = function(id) {
svgedit.path.getCtrlLine = function(id) { svgedit.path.getCtrlLine = function(id) {
var ctrlLine = svgedit.utilities.getElem('ctrlLine_'+id); var ctrlLine = svgedit.utilities.getElem('ctrlLine_'+id);
if (ctrlLine) {return ctrlLine;} if (ctrlLine) {return ctrlLine;}
ctrlLine = document.createElementNS(NS.SVG, 'line'); ctrlLine = document.createElementNS(NS.SVG, 'line');
svgedit.utilities.assignAttributes(ctrlLine, { svgedit.utilities.assignAttributes(ctrlLine, {
'id': 'ctrlLine_'+id, 'id': 'ctrlLine_'+id,
@ -249,6 +251,7 @@ svgedit.path.getControlPoints = function(seg) {
var i; var i;
for (i = 1; i < 3; i++) { for (i = 1; i < 3; i++) {
var id = index + 'c' + i; var id = index + 'c' + i;
var ctrlLine = cpt['c' + i + '_line'] = svgedit.path.getCtrlLine(id); var ctrlLine = cpt['c' + i + '_line'] = svgedit.path.getCtrlLine(id);
var pt = svgedit.path.getGripPt(seg, {x:item['x' + i], y:item['y' + i]}); var pt = svgedit.path.getGripPt(seg, {x:item['x' + i], y:item['y' + i]});
@ -344,6 +347,7 @@ svgedit.path.getSegSelector = function(seg, update) {
pts[i] = pt.x; pts[i] = pt.x;
pts[i+1] = pt.y; pts[i+1] = pt.y;
} }
svgedit.path.replacePathSeg(seg.type, 1, pts, segLine); svgedit.path.replacePathSeg(seg.type, 1, pts, segLine);
} }
return segLine; return segLine;
@ -715,7 +719,6 @@ svgedit.path.Path.prototype.deleteSeg = function(index) {
var pt; var pt;
if (seg.mate) { if (seg.mate) {
// Make the next point be the "M" point // Make the next point be the "M" point
pt = [next.item.x, next.item.y]; pt = [next.item.x, next.item.y];
svgedit.path.replacePathSeg(2, next.index, pt); svgedit.path.replacePathSeg(2, next.index, pt);