From ef98758752e7c07ff7fb8d1c350f4a6e30bf67a7 Mon Sep 17 00:00:00 2001 From: Mark MacKay Date: Wed, 4 Jul 2012 10:34:12 -0500 Subject: [PATCH] putting back the ruler indicators --- editor/svg-editor.js | 3 +-- editor/svgedit.compiled.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 913e2f0..bbf420b 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -1771,7 +1771,6 @@ } var zoom = svgCanvas.getZoom(); var w_area = workarea; - zoomChanged(window, { width: 0, height: 0, @@ -4523,7 +4522,7 @@ var title_show = document.getElementById("title_show"); var offset_x = 66; var offset_y = 48; - if (svgedit.browser.isTouch()) { + if (!svgedit.browser.isTouch()) { $("#workarea").unbind("mousemove.rulers").bind("mousemove.rulers", function(e){ e.stopPropagation(); ruler_x_cursor.style.left = (e.pageX-offset_x+workarea.scrollLeft) + "px"; diff --git a/editor/svgedit.compiled.js b/editor/svgedit.compiled.js index cac4166..b4de70d 100644 --- a/editor/svgedit.compiled.js +++ b/editor/svgedit.compiled.js @@ -383,7 +383,7 @@ K=false;try{if(window.localStorage)K=localStorage}catch(da){}try{if(window.globa ""};c.setConfig=function(z){a.each(z,function(p,L){p in o&&a.pref(p,L)});a.extend(true,d,z);if(z.extensions)d.extensions=z.extensions};c.setCustomHandlers=function(z){c.ready(function(){if(z.open){a('#tool_open > input[type="file"]').remove();a("#tool_open").show();f.open=z.open}if(z.save){c.show_save_warning=false;f.bind("saved",z.save)}z.pngsave&&f.bind("exported",z.pngsave);l=z})};c.randomizeIds=function(){f.randomizeIds(arguments)};c.init=function(){function z(q,A){var J=q.id,R=J.split("_"),W= R[0];R=R[1];A&&f.setStrokeAttr("stroke-"+W,R);db();Q("#cur_"+W,J,20);a(q).addClass("current").siblings().removeClass("current")}function p(q,A){a.pref("bkgd_color",q);a.pref("bkgd_url",A);f.setBackground(q,A)}function L(){var q=f.getHref(Y);q=q.indexOf("data:")===0?"":q;a.prompt(e.notification.enterNewImgURL,q,function(A){A&&La(A)})}function T(){if(f.deleteCurrentLayer()){Za();Fb();a("#layerlist tr.layer").removeClass("layersel");a("#layerlist tr.layer:first").addClass("layersel")}}function N(){var q= f.getCurrentDrawing().getCurrentLayerName()+" copy";a.prompt(e.notification.enterUniqueLayerName,q,function(A){if(A)if(f.getCurrentDrawing().hasLayer(A))a.alert(e.notification.dupeLayerName);else{f.cloneLayer(A);Za();Fb()}})}function K(q){var A=a("#layerlist tr.layersel").index(),J=f.getCurrentDrawing().getNumLayers();if(A>0||A=3E4){var Va=parseInt(Ba/3E4)+1;cb=Array(Va);cb[0]=Ea;for(var Ha=1;Ha=1)Ha=Math.round(Va);else{Ha=(Ta+"").split(".")[1].length;Ha=Va.toFixed(Ha)-0}if(Ha!==0&&Ha!==1E3&&Ha%1E3===0)Ha=Ha/1E3+"K";if(Ca){Ea.fillText(Ha,lb+2,8);Ea.fillStyle="#777"}else{Va=(Ha+"").split("");for(Ha=0;HaBa){Bb++;Ea.stroke();if(Bb>=cb.length){Ha=10;lb=ja;continue}Ea=cb[Bb];lb-=3E4;Ob=Math.round(lb+Va*Ha)+0.5}var Wb=Ha%2?12:10;if(Ca){Ea.moveTo(Ob,15);Ea.lineTo(Ob,Wb)}else{Ea.moveTo(15,Ob);Ea.lineTo(Wb,Ob)}}}Ea.strokeStyle="#666";Ea.stroke()}}(function(){var q=window.opener;if(q)try{var A=q.document.createEvent("Event");A.initEvent("svgEditorReady",true,true);q.document.documentElement.dispatchEvent(A)}catch(J){}})();