From a9896f345ee9afdea7595f4aecee8e2e2623bcc7 Mon Sep 17 00:00:00 2001 From: Mark MacKay Date: Wed, 25 Jul 2012 04:18:34 -0500 Subject: [PATCH] ipad changes --- editor/path.js | 16 +++++------ editor/svgedit.compiled.js | 50 ++++++++++++++++----------------- method-draw/path.js | 16 +++++------ method-draw/svgedit.compiled.js | 50 ++++++++++++++++----------------- 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/editor/path.js b/editor/path.js index 77ccef1..198836f 100644 --- a/editor/path.js +++ b/editor/path.js @@ -147,8 +147,8 @@ svgedit.path.addPointGrip = function(index, x, y) { svgedit.utilities.assignAttributes(pointGrip, { 'id': "pathpointgrip_" + index, 'display': "none", - 'width': svgeditor.browser.isTouch() ? 30 : 5, - 'height': svgeditor.browser.isTouch() ? 30 : 5, + 'width': svgedit.browser.isTouch() ? 30 : 5, + 'height': svgedit.browser.isTouch() ? 30 : 5, 'fill': "#fff", 'stroke': "#4F80FF", 'shape-rendering': "crispEdges", @@ -167,8 +167,8 @@ svgedit.path.addPointGrip = function(index, x, y) { if(x && y) { // set up the point grip element and display it svgedit.utilities.assignAttributes(pointGrip, { - 'x': x-(svgeditor.browser.isTouch() ? 15 : 2.5), - 'y': y-(svgeditor.browser.isTouch() ? 15 : 2.5), + 'x': x-(svgedit.browser.isTouch() ? 15 : 2.5), + 'y': y-(svgedit.browser.isTouch() ? 15 : 2.5), 'display': "inline" }); } @@ -193,7 +193,7 @@ svgedit.path.addCtrlGrip = function(id) { svgedit.utilities.assignAttributes(pointGrip, { 'id': "ctrlpointgrip_" + id, 'display': "none", - 'r': svgeditor.browser.isTouch() ? 15 : 3, + 'r': svgedit.browser.isTouch() ? 15 : 3, 'fill': "#4F80FF", 'cursor': 'move', 'style': 'pointer-events:all', @@ -224,8 +224,8 @@ svgedit.path.getPointGrip = function(seg, update) { if(update) { var pt = svgedit.path.getGripPt(seg); svgedit.utilities.assignAttributes(pointGrip, { - 'x': pt.x-(svgeditor.browser.isTouch() ? 15 : 2.5), - 'y': pt.y-(svgeditor.browser.isTouch() ? 15 : 2.5), + 'x': pt.x-(svgedit.browser.isTouch() ? 15 : 2.5), + 'y': pt.y-(svgedit.browser.isTouch() ? 15 : 2.5), 'display': "inline" }); } @@ -446,7 +446,7 @@ svgedit.path.Segment.prototype.addGrip = function() { svgedit.path.Segment.prototype.update = function(full) { if(this.ptgrip) { var pt = svgedit.path.getGripPt(this); - var reposition = (svgeditor.browser.isTouch() ? 15 : 2.5) + var reposition = (svgedit.browser.isTouch() ? 15 : 2.5) var properties = (this.ptgrip.nodeName == "rect") ? {'x': pt.x-reposition, 'y': pt.y-reposition} : {'cx': pt.x, 'cy': pt.y}; svgedit.utilities.assignAttributes(this.ptgrip, properties); svgedit.path.getSegSelector(this, true); diff --git a/editor/svgedit.compiled.js b/editor/svgedit.compiled.js index ba308ed..3f72585 100644 --- a/editor/svgedit.compiled.js +++ b/editor/svgedit.compiled.js @@ -167,31 +167,31 @@ m);break}}})();svgedit=svgedit||{}; (function(){if(!svgedit.path)svgedit.path={};var a={pathNodeTooltip:"Drag node to move it. Double-click node to change segment type",pathCtrlPtTooltip:"Drag control point to adjust curve properties"},p={2:["x","y"],4:["x","y"],6:["x","y","x1","y1","x2","y2"],8:["x","y","x1","y1"],10:["x","y","r1","r2","angle","largeArcFlag","sweepFlag"],12:["x"],14:["y"],16:["x","y","x2","y2"],18:["x","y"]},g=[],c=true,m={};svgedit.path.setLinkControlPoints=function(f){c=f};var s=svgedit.path.path=null;svgedit.path.init= function(f){s=f;g=[0,"ClosePath"];$.each(["Moveto","Lineto","CurvetoCubic","CurvetoQuadratic","Arc","LinetoHorizontal","LinetoVertical","CurvetoCubicSmooth","CurvetoQuadraticSmooth"],function(d,k){g.push(k+"Abs");g.push(k+"Rel")})};svgedit.path.insertItemBefore=function(f,d,k){f=f.pathSegList;if(svgedit.browser.supportsPathInsertItemBefore())f.insertItemBefore(d,k);else{for(var q=f.numberOfItems,B=[],o=0;o0){f=U element";this.elem=f;this.segs=[];this.selected_pts=[];svgedit.path.path=this;this.init()};svgedit.path.Path.prototype.init=function(){$(svgedit.path.getGripContainer()).find("*").attr("display","none");var f=this.elem.pathSegList,d=f.numberOfItems;this.segs=[];this.selected_pts=[];this.first_seg=null;for(var k=0;k=d?null:f[k+1],J=k-1<0?null:f[k-1];if(B.type===2){if(J&&J.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip()}q=k}else if(o&&o.type===1){B.next=f[q+1];B.next.prev=B;B.mate=f[q];B.addGrip();if(this.first_seg==null)this.first_seg=B}else if(o){if(B.type!==1){B.addGrip();if(o&&o.type!==2){B.next=o;B.next.prev=B}}}else if(B.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip();B.addGrip();if(!this.first_seg)this.first_seg= -f[q]}}return this};svgedit.path.Path.prototype.eachSeg=function(f){for(var d=this.segs.length,k=0;k0){f=U element";this.elem=f;this.segs=[];this.selected_pts=[];svgedit.path.path=this;this.init()};svgedit.path.Path.prototype.init=function(){$(svgedit.path.getGripContainer()).find("*").attr("display","none");var f=this.elem.pathSegList,d=f.numberOfItems;this.segs=[];this.selected_pts=[];this.first_seg=null;for(var k=0;k=d?null:f[k+1],J=k-1<0?null:f[k-1];if(B.type===2){if(J&&J.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip()}q=k}else if(o&&o.type===1){B.next=f[q+1];B.next.prev=B;B.mate=f[q];B.addGrip();if(this.first_seg==null)this.first_seg=B}else if(o){if(B.type!==1){B.addGrip();if(o&&o.type!==2){B.next=o;B.next.prev=B}}}else if(B.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip();B.addGrip();if(!this.first_seg)this.first_seg=f[q]}}return this};svgedit.path.Path.prototype.eachSeg=function(f){for(var d= +this.segs.length,k=0;k0){f=U element";this.elem=f;this.segs=[];this.selected_pts=[];svgedit.path.path=this;this.init()};svgedit.path.Path.prototype.init=function(){$(svgedit.path.getGripContainer()).find("*").attr("display","none");var f=this.elem.pathSegList,d=f.numberOfItems;this.segs=[];this.selected_pts=[];this.first_seg=null;for(var k=0;k=d?null:f[k+1],J=k-1<0?null:f[k-1];if(B.type===2){if(J&&J.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip()}q=k}else if(o&&o.type===1){B.next=f[q+1];B.next.prev=B;B.mate=f[q];B.addGrip();if(this.first_seg==null)this.first_seg=B}else if(o){if(B.type!==1){B.addGrip();if(o&&o.type!==2){B.next=o;B.next.prev=B}}}else if(B.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip();B.addGrip();if(!this.first_seg)this.first_seg= -f[q]}}return this};svgedit.path.Path.prototype.eachSeg=function(f){for(var d=this.segs.length,k=0;k0){f=U element";this.elem=f;this.segs=[];this.selected_pts=[];svgedit.path.path=this;this.init()};svgedit.path.Path.prototype.init=function(){$(svgedit.path.getGripContainer()).find("*").attr("display","none");var f=this.elem.pathSegList,d=f.numberOfItems;this.segs=[];this.selected_pts=[];this.first_seg=null;for(var k=0;k=d?null:f[k+1],J=k-1<0?null:f[k-1];if(B.type===2){if(J&&J.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip()}q=k}else if(o&&o.type===1){B.next=f[q+1];B.next.prev=B;B.mate=f[q];B.addGrip();if(this.first_seg==null)this.first_seg=B}else if(o){if(B.type!==1){B.addGrip();if(o&&o.type!==2){B.next=o;B.next.prev=B}}}else if(B.type!==1){o=f[q];o.next=f[q+1];o.next.prev=o;o.addGrip();B.addGrip();if(!this.first_seg)this.first_seg=f[q]}}return this};svgedit.path.Path.prototype.eachSeg=function(f){for(var d= +this.segs.length,k=0;k