select focus problem
parent
f990221112
commit
07461d3a2f
|
@ -192,7 +192,7 @@ $(function(){
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="draginput">
|
<div class="draginput">
|
||||||
<span>Sizes</span>
|
<span>Sizes</span>
|
||||||
<select id="resolution">
|
<select id="resolution">
|
||||||
<option id="selectedPredefined" selected="selected">Custom</option>
|
<option id="selectedPredefined" selected="selected">Custom</option>
|
||||||
|
@ -205,7 +205,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<label id="resolution_label">Custom</label>
|
<label id="resolution_label">Custom</label>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ $(function(){
|
||||||
<span>Y</span>
|
<span>Y</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="toolset draginput select twocol" id="tool_font_family">
|
<div class="toolset draginput select twocol" id="tool_font_family">
|
||||||
<!-- Font family -->
|
<!-- Font family -->
|
||||||
<span>Font</span>
|
<span>Font</span>
|
||||||
<div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div>
|
<div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div>
|
||||||
|
@ -349,7 +349,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div>
|
<div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div>
|
||||||
<div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div>
|
<div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
<label id="tool_font_size" data-title="Change Font Size">
|
<label id="tool_font_size" data-title="Change Font Size">
|
||||||
<input id="font_size" size="3" value="0" />
|
<input id="font_size" size="3" value="0" />
|
||||||
|
@ -396,7 +396,7 @@ $(function(){
|
||||||
<span>Y</span>
|
<span>Y</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label id="segment_type" class="draginput label">
|
<div id="segment_type" class="draginput label">
|
||||||
<span>Segment Type</span>
|
<span>Segment Type</span>
|
||||||
<select id="seg_type" data-title="Change Segment type">
|
<select id="seg_type" data-title="Change Segment type">
|
||||||
<option id="straight_segments" selected="selected" value="4">Straight</option>
|
<option id="straight_segments" selected="selected" value="4">Straight</option>
|
||||||
|
@ -404,7 +404,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<label id="seg_type_label">Straight</label>
|
<label id="seg_type_label">Straight</label>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
<label class="draginput checkbox" id="tool_node_link" data-title="Link Control Points">
|
<label class="draginput checkbox" id="tool_node_link" data-title="Link Control Points">
|
||||||
<span>Linked Control Points</span>
|
<span>Linked Control Points</span>
|
||||||
|
@ -498,7 +498,7 @@ $(function(){
|
||||||
<span class="icon_label">Stroke Width</span>
|
<span class="icon_label">Stroke Width</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<label class="stroke_tool draginput">
|
<div class="stroke_tool draginput">
|
||||||
<span>Stroke Dash</span>
|
<span>Stroke Dash</span>
|
||||||
<select id="stroke_style" data-title="Change stroke dash style">
|
<select id="stroke_style" data-title="Change stroke dash style">
|
||||||
<option selected="selected" value="none">—</option>
|
<option selected="selected" value="none">—</option>
|
||||||
|
@ -509,7 +509,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<label id="stroke_style_label">—</label>
|
<label id="stroke_style_label">—</label>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
<label style="display: none;">
|
<label style="display: none;">
|
||||||
<span class="icon_label">Stroke Join</span>
|
<span class="icon_label">Stroke Join</span>
|
||||||
|
@ -560,7 +560,7 @@ $(function(){
|
||||||
|
|
||||||
<!-- Zoom buttons -->
|
<!-- Zoom buttons -->
|
||||||
<div id="zoom_panel" class="toolset" title="Change zoom level">
|
<div id="zoom_panel" class="toolset" title="Change zoom level">
|
||||||
<label class="draginput select" id="zoom_label">
|
<div class="draginput select" id="zoom_label">
|
||||||
<span id="zoomLabel" class="zoom_tool icon_label"></span>
|
<span id="zoomLabel" class="zoom_tool icon_label"></span>
|
||||||
<select id="zoom_select">
|
<select id="zoom_select">
|
||||||
<option value="6">6%</option>
|
<option value="6">6%</option>
|
||||||
|
@ -580,7 +580,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<input id="zoom" size="3" value="100%" type="text" readonly="readonly" />
|
<input id="zoom" size="3" value="100%" type="text" readonly="readonly" />
|
||||||
</label>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tools_bottom_3">
|
<div id="tools_bottom_3">
|
||||||
|
|
|
@ -2353,13 +2353,11 @@
|
||||||
var clickBold = function(){
|
var clickBold = function(){
|
||||||
svgCanvas.setBold( !svgCanvas.getBold() );
|
svgCanvas.setBold( !svgCanvas.getBold() );
|
||||||
updateContextPanel();
|
updateContextPanel();
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var clickItalic = function(){
|
var clickItalic = function(){
|
||||||
svgCanvas.setItalic( !svgCanvas.getItalic() );
|
svgCanvas.setItalic( !svgCanvas.getItalic() );
|
||||||
updateContextPanel();
|
updateContextPanel();
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var clickExport = function() {
|
var clickExport = function() {
|
||||||
|
@ -2493,7 +2491,7 @@
|
||||||
var minimizeModal = function() {
|
var minimizeModal = function() {
|
||||||
|
|
||||||
if (window.self != window.top) { //we're in an iframe
|
if (window.self != window.top) { //we're in an iframe
|
||||||
top.exports.setEditorFocus(false);
|
top.exit_fullscreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -446,16 +446,16 @@ null||ta){window.event.type==="keydown"&&Ua(a("#edit_menu"));g.copySelectedEleme
|
||||||
tb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Up")}},Bb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Down")}},xb=function(m){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected(m)}},ka=function(){if(Y!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");
|
tb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Up")}},Bb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Down")}},xb=function(m){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected(m)}},ka=function(){if(Y!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");
|
||||||
K.toEditMode(elems[0]);g.clearSelection();X()}},ca=function(){Y!=null&&K.reorient()},la=function(){if(Y!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://",function(m){m&&g.makeHyperlink(m)})},M=function(m,w){if(Y!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;m*=C;w*=C}a("input").blur();g.moveSelectedElements(m,w)}},T=function(){var m=!a("#tool_node_link").hasClass("checked");m?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):
|
K.toEditMode(elems[0]);g.clearSelection();X()}},ca=function(){Y!=null&&K.reorient()},la=function(){if(Y!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://",function(m){m&&g.makeHyperlink(m)})},M=function(m,w){if(Y!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;m*=C;w*=C}a("input").blur();g.moveSelectedElements(m,w)}},T=function(){var m=!a("#tool_node_link").hasClass("checked");m?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):
|
||||||
a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);K.linkControlPoints(m)},ea=function(){K.getNodePoint()&&K.clonePathNode()},Ga=function(){K.getNodePoint()&&K.deletePathNode()},Pa=function(){var m=a("#tool_add_subpath"),w=!m.hasClass("push_button_pressed");w?m.addClass("push_button_pressed").removeClass("tool_button"):m.removeClass("push_button_pressed").addClass("tool_button");K.addSubPath(w)},Za=function(){K.opencloseSubPath()},gb=function(){g.cycleElement(1)},pb=function(){g.cycleElement(0)},
|
a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);K.linkControlPoints(m)},ea=function(){K.getNodePoint()&&K.clonePathNode()},Ga=function(){K.getNodePoint()&&K.deletePathNode()},Pa=function(){var m=a("#tool_add_subpath"),w=!m.hasClass("push_button_pressed");w?m.addClass("push_button_pressed").removeClass("tool_button"):m.removeClass("push_button_pressed").addClass("tool_button");K.addSubPath(w)},Za=function(){K.opencloseSubPath()},gb=function(){g.cycleElement(1)},pb=function(){g.cycleElement(0)},
|
||||||
Ra=function(m,w){if(!(Y==null||ta)){m||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);wa()}},rb=function(){var m=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear,function(w){if(w){ba();g.clear();g.setResolution(m[0],m[1]);H(true);vb();wa();pa();g.runExtensions("onNewDocument")}})},Sa=function(){g.setBold(!g.getBold());wa();return false},ub=function(){g.setItalic(!g.getItalic());wa();return false},yb=function(){if(!c.pngsave){var m=uiStrings.notification.loadingImage;O=
|
Ra=function(m,w){if(!(Y==null||ta)){m||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);wa()}},rb=function(){var m=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear,function(w){if(w){ba();g.clear();g.setResolution(m[0],m[1]);H(true);vb();wa();pa();g.runExtensions("onNewDocument")}})},Sa=function(){g.setBold(!g.getBold());wa()},ub=function(){g.setItalic(!g.getItalic());wa()},yb=function(){if(!c.pngsave){var m=uiStrings.notification.loadingImage;O=window.open("data:text/html;charset=utf-8,<title>"+
|
||||||
window.open("data:text/html;charset=utf-8,<title>"+m+"</title><h1>"+m+"</h1>")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})},Kb=function(){g.open()},Jb=function(){},Ua=function(m){var w=m.prev();w.css("background","#09f");setTimeout(function(){w.css("background","")},200)},Ma=function(){if(U.getUndoStackSize()>0){window.event.type==="keydown"&&Ua(a("#edit_menu"));U.undo()}},Ob=function(){if(U.getRedoStackSize()>
|
m+"</title><h1>"+m+"</h1>")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})},Kb=function(){g.open()},Jb=function(){},Ua=function(m){var w=m.prev();w.css("background","#09f");setTimeout(function(){w.css("background","")},200)},Ma=function(){if(U.getUndoStackSize()>0){window.event.type==="keydown"&&Ua(a("#edit_menu"));U.undo()}},Ob=function(){if(U.getRedoStackSize()>0){window.event.type==="keydown"&&Ua(a("#edit_menu"));
|
||||||
0){window.event.type==="keydown"&&Ua(a("#edit_menu"));U.redo()}},Hb=function(){if(ta)g.groupSelectedElements();else Y&&g.ungroupSelectedElement()},Nb=function(){window.event.type==="keydown"&&Ua(a("#edit_menu"));g.cloneSelectedElements(20,20)},Pb=function(){var m=this.id.replace("tool_align","").charAt(0);g.alignSelectedElements(m,a("#align_relative_to").val())},Rb=function(){var m=document.querySelector("#tool_stroke rect"),w=document.querySelector("#tool_fill rect"),C=w.getAttribute("fill"),I=m.getAttribute("fill");
|
U.redo()}},Hb=function(){if(ta)g.groupSelectedElements();else Y&&g.ungroupSelectedElement()},Nb=function(){window.event.type==="keydown"&&Ua(a("#edit_menu"));g.cloneSelectedElements(20,20)},Pb=function(){var m=this.id.replace("tool_align","").charAt(0);g.alignSelectedElements(m,a("#align_relative_to").val())},Rb=function(){var m=document.querySelector("#tool_stroke rect"),w=document.querySelector("#tool_fill rect"),C=w.getAttribute("fill"),I=m.getAttribute("fill");m=parseFloat(m.getAttribute("stroke-opacity"));
|
||||||
m=parseFloat(m.getAttribute("stroke-opacity"));if(isNaN(m))m=100;w=parseFloat(w.getAttribute("fill-opacity"));if(isNaN(w))w=100;I=Fa(I,m,"stroke");C=Fa(C,w,"fill");b.paintBox.fill.setPaint(I,true);b.paintBox.stroke.setPaint(C,true)},vb=function(m){var w=g.getResolution();m=m?w.zoom*m:1;a("#zoom").val(m*100);g.setZoom(m);Mb();H(true)},Lb=function(){!a("#tool_wireframe").hasClass("push_button_pressed")?a("#tool_wireframe").addClass("push_button_pressed"):a("#tool_wireframe").removeClass("push_button_pressed");
|
if(isNaN(m))m=100;w=parseFloat(w.getAttribute("fill-opacity"));if(isNaN(w))w=100;I=Fa(I,m,"stroke");C=Fa(C,w,"fill");b.paintBox.fill.setPaint(I,true);b.paintBox.stroke.setPaint(C,true)},vb=function(m){var w=g.getResolution();m=m?w.zoom*m:1;a("#zoom").val(m*100);g.setZoom(m);Mb();H(true)},Lb=function(){!a("#tool_wireframe").hasClass("push_button_pressed")?a("#tool_wireframe").addClass("push_button_pressed"):a("#tool_wireframe").removeClass("push_button_pressed");R.toggleClass("wireframe");if(!A){var m=
|
||||||
R.toggleClass("wireframe");if(!A){var m=a("#wireframe_rules");m.length?m.empty():a('<style id="wireframe_rules"></style>').appendTo("head");Mb()}},Sb=function(){var m=!a("#tool_snap").hasClass("push_button_pressed");m?a("#tool_snap").addClass("push_button_pressed"):a("#tool_snap").removeClass("push_button_pressed");curConfig.gridSnapping=m},Eb=function(){window.self!=window.top&&top.exports.setEditorFocus(false)},mb=function(){if(a("#tool_rulers").hasClass("push_button_pressed")){a("#tool_rulers").removeClass("push_button_pressed");
|
a("#wireframe_rules");m.length?m.empty():a('<style id="wireframe_rules"></style>').appendTo("head");Mb()}},Sb=function(){var m=!a("#tool_snap").hasClass("push_button_pressed");m?a("#tool_snap").addClass("push_button_pressed"):a("#tool_snap").removeClass("push_button_pressed");curConfig.gridSnapping=m},Eb=function(){window.self!=window.top&&top.exit_fullscreen()},mb=function(){if(a("#tool_rulers").hasClass("push_button_pressed")){a("#tool_rulers").removeClass("push_button_pressed");a("#show_rulers").attr("checked",
|
||||||
a("#show_rulers").attr("checked",false);curConfig.showRulers=false}else{a("#tool_rulers").addClass("push_button_pressed");a("#show_rulers").attr("checked",true);curConfig.showRulers=true}a("#rulers").toggle(!!curConfig.showRulers)},Mb=function(){if(!A){var m="#workarea.wireframe #svgcontent * { stroke-width: "+1/g.getZoom()+"px; }";a("#wireframe_rules").text(R.hasClass("wireframe")?m:"")}},Qb=function(m,w){if(!ja){ja=true;a("#save_output_btns").toggle(!!w);a("#tool_source_back").toggle(!w);var C=
|
false);curConfig.showRulers=false}else{a("#tool_rulers").addClass("push_button_pressed");a("#show_rulers").attr("checked",true);curConfig.showRulers=true}a("#rulers").toggle(!!curConfig.showRulers)},Mb=function(){if(!A){var m="#workarea.wireframe #svgcontent * { stroke-width: "+1/g.getZoom()+"px; }";a("#wireframe_rules").text(R.hasClass("wireframe")?m:"")}},Qb=function(m,w){if(!ja){ja=true;a("#save_output_btns").toggle(!!w);a("#tool_source_back").toggle(!w);var C=ga=g.getSvgString();a("#svg_source_textarea").val(C);
|
||||||
ga=g.getSvgString();a("#svg_source_textarea").val(C);a("#svg_source_editor").fadeIn();a("#svg_source_textarea").focus().select()}},Db=function(){if(ja){if(g.setSvgString(a("#svg_source_textarea").val())){g.clearSelection();z();vb();pa()}else a.confirm(uiStrings.notification.QerrorsRevertToSource,function(m){if(!m)return false;g.clearSelection();z();vb();pa()});ba()}},eb=b.setIcon=function(m,w){var C=typeof w==="string"?a.getSvgIcon(w,true):w.clone();C?a(m).find("img").replaceWith(C):console.log("NOTE: Icon image missing: "+
|
a("#svg_source_editor").fadeIn();a("#svg_source_textarea").focus().select()}},Db=function(){if(ja){if(g.setSvgString(a("#svg_source_textarea").val())){g.clearSelection();z();vb();pa()}else a.confirm(uiStrings.notification.QerrorsRevertToSource,function(m){if(!m)return false;g.clearSelection();z();vb();pa()});ba()}},eb=b.setIcon=function(m,w){var C=typeof w==="string"?a.getSvgIcon(w,true):w.clone();C?a(m).find("img").replaceWith(C):console.log("NOTE: Icon image missing: "+w)},Gb;Gb=function(){var m=
|
||||||
w)},Gb;Gb=function(){var m=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,w=document.getElementsByTagName("script")[0],C;for(C in w.style)if(m.test(C))return C.match(m)[0];if("WebkitOpacity"in w.style)return"Webkit";if("KhtmlOpacity"in w.style)return"Khtml";return""}();var e=function(m,w){Gb.toLowerCase();var C=["top","left","bottom","right"];m.each(function(){for(var I=a(this),S=I.outerWidth()*(w-1),Q=I.outerHeight()*(w-1),V=0;V<4;V++){var aa=C[V],fa=I.data("orig_margin-"+aa);if(fa==null){fa=parseInt(I.css("margin-"+
|
/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,w=document.getElementsByTagName("script")[0],C;for(C in w.style)if(m.test(C))return C.match(m)[0];if("WebkitOpacity"in w.style)return"Webkit";if("KhtmlOpacity"in w.style)return"Khtml";return""}();var e=function(m,w){Gb.toLowerCase();var C=["top","left","bottom","right"];m.each(function(){for(var I=a(this),S=I.outerWidth()*(w-1),Q=I.outerHeight()*(w-1),V=0;V<4;V++){var aa=C[V],fa=I.data("orig_margin-"+aa);if(fa==null){fa=parseInt(I.css("margin-"+aa));I.data("orig_margin-"+
|
||||||
aa));I.data("orig_margin-"+aa,fa)}fa=fa*w;if(aa==="right")fa+=S;else if(aa==="bottom")fa+=Q;I.css("margin-"+aa,fa)}})},h=b.setIconSize=function(m,w){if(!(m==s.size&&!w)){var C=a("#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout"),I=1;I=typeof m=="number"?m:{s:0.75,m:1,l:1.25,xl:1.5}[m];b.tool_scale=ha=I;Ca();var S=C.parents(":hidden");S.css("visibility",
|
aa,fa)}fa=fa*w;if(aa==="right")fa+=S;else if(aa==="bottom")fa+=Q;I.css("margin-"+aa,fa)}})},h=b.setIconSize=function(m,w){if(!(m==s.size&&!w)){var C=a("#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout"),I=1;I=typeof m=="number"?m:{s:0.75,m:1,l:1.25,xl:1.5}[m];b.tool_scale=ha=I;Ca();var S=C.parents(":hidden");S.css("visibility","hidden").show();e(C,
|
||||||
"hidden").show();e(C,I);S.css("visibility","visible").hide();C=a("#tool_size_rules");if(C.length)C.empty();else C=a('<style id="tool_size_rules"></style>').appendTo("head");if(m!="m"){var Q="";a.each(cssResizeRules,function(V,aa){V="#svg_editor "+V.replace(/,/g,", #svg_editor");Q+=V+"{";a.each(aa,function(fa,qa){if(typeof qa==="number")var sa=qa*I+"px";else if(qa[m]||qa.all)sa=qa[m]||qa.all;Q+=fa+":"+sa+";"});Q+="}"});S="-"+Gb.toLowerCase()+"-";Q+="#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout{"+
|
I);S.css("visibility","visible").hide();C=a("#tool_size_rules");if(C.length)C.empty();else C=a('<style id="tool_size_rules"></style>').appendTo("head");if(m!="m"){var Q="";a.each(cssResizeRules,function(V,aa){V="#svg_editor "+V.replace(/,/g,", #svg_editor");Q+=V+"{";a.each(aa,function(fa,qa){if(typeof qa==="number")var sa=qa*I+"px";else if(qa[m]||qa.all)sa=qa[m]||qa.all;Q+=fa+":"+sa+";"});Q+="}"});S="-"+Gb.toLowerCase()+"-";Q+="#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout{"+
|
||||||
S+"transform: scale("+I+");} #svg_editor div.toolset .toolset {"+S+"transform: scale(1); margin: 1px !important;} #svg_editor .ui-slider {"+S+"transform: scale("+1/I+");}";C.text(Q)}Ca()}},l=function(){a("#dialog_box").hide();if(ja){if(ja)ga!==a("#svg_source_textarea").val()?a.confirm(uiStrings.notification.QignoreSourceChanges,function(m){m&&z()}):z();v()}else da&&g.leaveContext()},z=function(){a("#svg_source_editor").hide();ja=false;a("#svg_source_textarea").blur()};a(window).width();a(window).height();
|
S+"transform: scale("+I+");} #svg_editor div.toolset .toolset {"+S+"transform: scale(1); margin: 1px !important;} #svg_editor .ui-slider {"+S+"transform: scale("+1/I+");}";C.text(Q)}Ca()}},l=function(){a("#dialog_box").hide();if(ja){if(ja)ga!==a("#svg_source_textarea").val()?a.confirm(uiStrings.notification.QignoreSourceChanges,function(m){m&&z()}):z();v()}else da&&g.leaveContext()},z=function(){a("#svg_source_editor").hide();ja=false;a("#svg_source_textarea").blur()};a(window).width();a(window).height();
|
||||||
var v=a.noop;a(window).resize(function(){H()});(function(){R.scroll(function(){if(a("#ruler_x").length!=0)a("#ruler_x")[0].scrollLeft=R[0].scrollLeft;if(a("#ruler_y").length!=0)a("#ruler_y")[0].scrollTop=R[0].scrollTop})})();a("#url_notice").click(function(){a.alert(this.title)});a("#change_image_url").click(function(){var m=g.getHref(Y);m=m.indexOf("data:")===0?"":m;a.prompt(uiStrings.notification.enterNewImgURL,m,function(w){w&&Ea(w)})});var G=function(m){var w=m[0].id=="stroke_color"?"stroke":
|
var v=a.noop;a(window).resize(function(){H()});(function(){R.scroll(function(){if(a("#ruler_x").length!=0)a("#ruler_x")[0].scrollLeft=R[0].scrollLeft;if(a("#ruler_y").length!=0)a("#ruler_y")[0].scrollTop=R[0].scrollTop})})();a("#url_notice").click(function(){a.alert(this.title)});a("#change_image_url").click(function(){var m=g.getHref(Y);m=m.indexOf("data:")===0?"":m;a.prompt(uiStrings.notification.enterNewImgURL,m,function(w){w&&Ea(w)})});var G=function(m){var w=m[0].id=="stroke_color"?"stroke":
|
||||||
"fill",C=m[0].id=="canvas_color";if(C)w="canvas";var I=b.paintBox[w].paint;m=w=="stroke"?"Pick a Stroke Paint and Opacity":"Pick a Fill Paint and Opacity";C=C?{right:175,top:50}:{left:50,bottom:50};a("#color_picker").draggable({cancel:".jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker",containment:"window"}).removeAttr("style").css(C).jGraduate({paint:I,window:{pickerTitle:m},images:{clientPath:curConfig.jGraduatePath},newstop:"inverse"},function(S){I=new a.jGraduate.Paint(S);b.paintBox[w].setPaint(I);
|
"fill",C=m[0].id=="canvas_color";if(C)w="canvas";var I=b.paintBox[w].paint;m=w=="stroke"?"Pick a Stroke Paint and Opacity":"Pick a Fill Paint and Opacity";C=C?{right:175,top:50}:{left:50,bottom:50};a("#color_picker").draggable({cancel:".jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker",containment:"window"}).removeAttr("style").css(C).jGraduate({paint:I,window:{pickerTitle:m},images:{clientPath:curConfig.jGraduatePath},newstop:"inverse"},function(S){I=new a.jGraduate.Paint(S);b.paintBox[w].setPaint(I);
|
||||||
|
|
|
@ -192,7 +192,7 @@ $(function(){
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="draginput">
|
<div class="draginput">
|
||||||
<span>Sizes</span>
|
<span>Sizes</span>
|
||||||
<select id="resolution">
|
<select id="resolution">
|
||||||
<option id="selectedPredefined" selected="selected">Custom</option>
|
<option id="selectedPredefined" selected="selected">Custom</option>
|
||||||
|
@ -205,7 +205,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<label id="resolution_label">Custom</label>
|
<label id="resolution_label">Custom</label>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ $(function(){
|
||||||
<span>Y</span>
|
<span>Y</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="toolset draginput select twocol" id="tool_font_family">
|
<div class="toolset draginput select twocol" id="tool_font_family">
|
||||||
<!-- Font family -->
|
<!-- Font family -->
|
||||||
<span>Font</span>
|
<span>Font</span>
|
||||||
<div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div>
|
<div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div>
|
||||||
|
@ -349,7 +349,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div>
|
<div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div>
|
||||||
<div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div>
|
<div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
<label id="tool_font_size" data-title="Change Font Size">
|
<label id="tool_font_size" data-title="Change Font Size">
|
||||||
<input id="font_size" size="3" value="0" />
|
<input id="font_size" size="3" value="0" />
|
||||||
|
@ -396,7 +396,7 @@ $(function(){
|
||||||
<span>Y</span>
|
<span>Y</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label id="segment_type" class="draginput label">
|
<div id="segment_type" class="draginput label">
|
||||||
<span>Segment Type</span>
|
<span>Segment Type</span>
|
||||||
<select id="seg_type" data-title="Change Segment type">
|
<select id="seg_type" data-title="Change Segment type">
|
||||||
<option id="straight_segments" selected="selected" value="4">Straight</option>
|
<option id="straight_segments" selected="selected" value="4">Straight</option>
|
||||||
|
@ -404,7 +404,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<label id="seg_type_label">Straight</label>
|
<label id="seg_type_label">Straight</label>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
<label class="draginput checkbox" id="tool_node_link" data-title="Link Control Points">
|
<label class="draginput checkbox" id="tool_node_link" data-title="Link Control Points">
|
||||||
<span>Linked Control Points</span>
|
<span>Linked Control Points</span>
|
||||||
|
@ -498,7 +498,7 @@ $(function(){
|
||||||
<span class="icon_label">Stroke Width</span>
|
<span class="icon_label">Stroke Width</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<label class="stroke_tool draginput">
|
<div class="stroke_tool draginput">
|
||||||
<span>Stroke Dash</span>
|
<span>Stroke Dash</span>
|
||||||
<select id="stroke_style" data-title="Change stroke dash style">
|
<select id="stroke_style" data-title="Change stroke dash style">
|
||||||
<option selected="selected" value="none">—</option>
|
<option selected="selected" value="none">—</option>
|
||||||
|
@ -509,7 +509,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<label id="stroke_style_label">—</label>
|
<label id="stroke_style_label">—</label>
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
<label style="display: none;">
|
<label style="display: none;">
|
||||||
<span class="icon_label">Stroke Join</span>
|
<span class="icon_label">Stroke Join</span>
|
||||||
|
@ -560,7 +560,7 @@ $(function(){
|
||||||
|
|
||||||
<!-- Zoom buttons -->
|
<!-- Zoom buttons -->
|
||||||
<div id="zoom_panel" class="toolset" title="Change zoom level">
|
<div id="zoom_panel" class="toolset" title="Change zoom level">
|
||||||
<label class="draginput select" id="zoom_label">
|
<div class="draginput select" id="zoom_label">
|
||||||
<span id="zoomLabel" class="zoom_tool icon_label"></span>
|
<span id="zoomLabel" class="zoom_tool icon_label"></span>
|
||||||
<select id="zoom_select">
|
<select id="zoom_select">
|
||||||
<option value="6">6%</option>
|
<option value="6">6%</option>
|
||||||
|
@ -580,7 +580,7 @@ $(function(){
|
||||||
</select>
|
</select>
|
||||||
<div class="caret"></div>
|
<div class="caret"></div>
|
||||||
<input id="zoom" size="3" value="100%" type="text" readonly="readonly" />
|
<input id="zoom" size="3" value="100%" type="text" readonly="readonly" />
|
||||||
</label>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tools_bottom_3">
|
<div id="tools_bottom_3">
|
||||||
|
|
|
@ -2353,13 +2353,11 @@
|
||||||
var clickBold = function(){
|
var clickBold = function(){
|
||||||
svgCanvas.setBold( !svgCanvas.getBold() );
|
svgCanvas.setBold( !svgCanvas.getBold() );
|
||||||
updateContextPanel();
|
updateContextPanel();
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var clickItalic = function(){
|
var clickItalic = function(){
|
||||||
svgCanvas.setItalic( !svgCanvas.getItalic() );
|
svgCanvas.setItalic( !svgCanvas.getItalic() );
|
||||||
updateContextPanel();
|
updateContextPanel();
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var clickExport = function() {
|
var clickExport = function() {
|
||||||
|
@ -2493,7 +2491,7 @@
|
||||||
var minimizeModal = function() {
|
var minimizeModal = function() {
|
||||||
|
|
||||||
if (window.self != window.top) { //we're in an iframe
|
if (window.self != window.top) { //we're in an iframe
|
||||||
top.exports.setEditorFocus(false);
|
top.exit_fullscreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -446,16 +446,16 @@ null||ta){window.event.type==="keydown"&&Ua(a("#edit_menu"));g.copySelectedEleme
|
||||||
tb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Up")}},Bb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Down")}},xb=function(m){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected(m)}},ka=function(){if(Y!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");
|
tb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Up")}},Bb=function(){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected("Down")}},xb=function(m){if(Y!=null){window.event.type==="keydown"&&Ua(a("#object_menu"));g.moveUpDownSelected(m)}},ka=function(){if(Y!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");
|
||||||
K.toEditMode(elems[0]);g.clearSelection();X()}},ca=function(){Y!=null&&K.reorient()},la=function(){if(Y!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://",function(m){m&&g.makeHyperlink(m)})},M=function(m,w){if(Y!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;m*=C;w*=C}a("input").blur();g.moveSelectedElements(m,w)}},T=function(){var m=!a("#tool_node_link").hasClass("checked");m?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):
|
K.toEditMode(elems[0]);g.clearSelection();X()}},ca=function(){Y!=null&&K.reorient()},la=function(){if(Y!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://",function(m){m&&g.makeHyperlink(m)})},M=function(m,w){if(Y!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;m*=C;w*=C}a("input").blur();g.moveSelectedElements(m,w)}},T=function(){var m=!a("#tool_node_link").hasClass("checked");m?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):
|
||||||
a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);K.linkControlPoints(m)},ea=function(){K.getNodePoint()&&K.clonePathNode()},Ga=function(){K.getNodePoint()&&K.deletePathNode()},Pa=function(){var m=a("#tool_add_subpath"),w=!m.hasClass("push_button_pressed");w?m.addClass("push_button_pressed").removeClass("tool_button"):m.removeClass("push_button_pressed").addClass("tool_button");K.addSubPath(w)},Za=function(){K.opencloseSubPath()},gb=function(){g.cycleElement(1)},pb=function(){g.cycleElement(0)},
|
a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);K.linkControlPoints(m)},ea=function(){K.getNodePoint()&&K.clonePathNode()},Ga=function(){K.getNodePoint()&&K.deletePathNode()},Pa=function(){var m=a("#tool_add_subpath"),w=!m.hasClass("push_button_pressed");w?m.addClass("push_button_pressed").removeClass("tool_button"):m.removeClass("push_button_pressed").addClass("tool_button");K.addSubPath(w)},Za=function(){K.opencloseSubPath()},gb=function(){g.cycleElement(1)},pb=function(){g.cycleElement(0)},
|
||||||
Ra=function(m,w){if(!(Y==null||ta)){m||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);wa()}},rb=function(){var m=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear,function(w){if(w){ba();g.clear();g.setResolution(m[0],m[1]);H(true);vb();wa();pa();g.runExtensions("onNewDocument")}})},Sa=function(){g.setBold(!g.getBold());wa();return false},ub=function(){g.setItalic(!g.getItalic());wa();return false},yb=function(){if(!c.pngsave){var m=uiStrings.notification.loadingImage;O=
|
Ra=function(m,w){if(!(Y==null||ta)){m||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);wa()}},rb=function(){var m=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear,function(w){if(w){ba();g.clear();g.setResolution(m[0],m[1]);H(true);vb();wa();pa();g.runExtensions("onNewDocument")}})},Sa=function(){g.setBold(!g.getBold());wa()},ub=function(){g.setItalic(!g.getItalic());wa()},yb=function(){if(!c.pngsave){var m=uiStrings.notification.loadingImage;O=window.open("data:text/html;charset=utf-8,<title>"+
|
||||||
window.open("data:text/html;charset=utf-8,<title>"+m+"</title><h1>"+m+"</h1>")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})},Kb=function(){g.open()},Jb=function(){},Ua=function(m){var w=m.prev();w.css("background","#09f");setTimeout(function(){w.css("background","")},200)},Ma=function(){if(U.getUndoStackSize()>0){window.event.type==="keydown"&&Ua(a("#edit_menu"));U.undo()}},Ob=function(){if(U.getRedoStackSize()>
|
m+"</title><h1>"+m+"</h1>")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})},Kb=function(){g.open()},Jb=function(){},Ua=function(m){var w=m.prev();w.css("background","#09f");setTimeout(function(){w.css("background","")},200)},Ma=function(){if(U.getUndoStackSize()>0){window.event.type==="keydown"&&Ua(a("#edit_menu"));U.undo()}},Ob=function(){if(U.getRedoStackSize()>0){window.event.type==="keydown"&&Ua(a("#edit_menu"));
|
||||||
0){window.event.type==="keydown"&&Ua(a("#edit_menu"));U.redo()}},Hb=function(){if(ta)g.groupSelectedElements();else Y&&g.ungroupSelectedElement()},Nb=function(){window.event.type==="keydown"&&Ua(a("#edit_menu"));g.cloneSelectedElements(20,20)},Pb=function(){var m=this.id.replace("tool_align","").charAt(0);g.alignSelectedElements(m,a("#align_relative_to").val())},Rb=function(){var m=document.querySelector("#tool_stroke rect"),w=document.querySelector("#tool_fill rect"),C=w.getAttribute("fill"),I=m.getAttribute("fill");
|
U.redo()}},Hb=function(){if(ta)g.groupSelectedElements();else Y&&g.ungroupSelectedElement()},Nb=function(){window.event.type==="keydown"&&Ua(a("#edit_menu"));g.cloneSelectedElements(20,20)},Pb=function(){var m=this.id.replace("tool_align","").charAt(0);g.alignSelectedElements(m,a("#align_relative_to").val())},Rb=function(){var m=document.querySelector("#tool_stroke rect"),w=document.querySelector("#tool_fill rect"),C=w.getAttribute("fill"),I=m.getAttribute("fill");m=parseFloat(m.getAttribute("stroke-opacity"));
|
||||||
m=parseFloat(m.getAttribute("stroke-opacity"));if(isNaN(m))m=100;w=parseFloat(w.getAttribute("fill-opacity"));if(isNaN(w))w=100;I=Fa(I,m,"stroke");C=Fa(C,w,"fill");b.paintBox.fill.setPaint(I,true);b.paintBox.stroke.setPaint(C,true)},vb=function(m){var w=g.getResolution();m=m?w.zoom*m:1;a("#zoom").val(m*100);g.setZoom(m);Mb();H(true)},Lb=function(){!a("#tool_wireframe").hasClass("push_button_pressed")?a("#tool_wireframe").addClass("push_button_pressed"):a("#tool_wireframe").removeClass("push_button_pressed");
|
if(isNaN(m))m=100;w=parseFloat(w.getAttribute("fill-opacity"));if(isNaN(w))w=100;I=Fa(I,m,"stroke");C=Fa(C,w,"fill");b.paintBox.fill.setPaint(I,true);b.paintBox.stroke.setPaint(C,true)},vb=function(m){var w=g.getResolution();m=m?w.zoom*m:1;a("#zoom").val(m*100);g.setZoom(m);Mb();H(true)},Lb=function(){!a("#tool_wireframe").hasClass("push_button_pressed")?a("#tool_wireframe").addClass("push_button_pressed"):a("#tool_wireframe").removeClass("push_button_pressed");R.toggleClass("wireframe");if(!A){var m=
|
||||||
R.toggleClass("wireframe");if(!A){var m=a("#wireframe_rules");m.length?m.empty():a('<style id="wireframe_rules"></style>').appendTo("head");Mb()}},Sb=function(){var m=!a("#tool_snap").hasClass("push_button_pressed");m?a("#tool_snap").addClass("push_button_pressed"):a("#tool_snap").removeClass("push_button_pressed");curConfig.gridSnapping=m},Eb=function(){window.self!=window.top&&top.exports.setEditorFocus(false)},mb=function(){if(a("#tool_rulers").hasClass("push_button_pressed")){a("#tool_rulers").removeClass("push_button_pressed");
|
a("#wireframe_rules");m.length?m.empty():a('<style id="wireframe_rules"></style>').appendTo("head");Mb()}},Sb=function(){var m=!a("#tool_snap").hasClass("push_button_pressed");m?a("#tool_snap").addClass("push_button_pressed"):a("#tool_snap").removeClass("push_button_pressed");curConfig.gridSnapping=m},Eb=function(){window.self!=window.top&&top.exit_fullscreen()},mb=function(){if(a("#tool_rulers").hasClass("push_button_pressed")){a("#tool_rulers").removeClass("push_button_pressed");a("#show_rulers").attr("checked",
|
||||||
a("#show_rulers").attr("checked",false);curConfig.showRulers=false}else{a("#tool_rulers").addClass("push_button_pressed");a("#show_rulers").attr("checked",true);curConfig.showRulers=true}a("#rulers").toggle(!!curConfig.showRulers)},Mb=function(){if(!A){var m="#workarea.wireframe #svgcontent * { stroke-width: "+1/g.getZoom()+"px; }";a("#wireframe_rules").text(R.hasClass("wireframe")?m:"")}},Qb=function(m,w){if(!ja){ja=true;a("#save_output_btns").toggle(!!w);a("#tool_source_back").toggle(!w);var C=
|
false);curConfig.showRulers=false}else{a("#tool_rulers").addClass("push_button_pressed");a("#show_rulers").attr("checked",true);curConfig.showRulers=true}a("#rulers").toggle(!!curConfig.showRulers)},Mb=function(){if(!A){var m="#workarea.wireframe #svgcontent * { stroke-width: "+1/g.getZoom()+"px; }";a("#wireframe_rules").text(R.hasClass("wireframe")?m:"")}},Qb=function(m,w){if(!ja){ja=true;a("#save_output_btns").toggle(!!w);a("#tool_source_back").toggle(!w);var C=ga=g.getSvgString();a("#svg_source_textarea").val(C);
|
||||||
ga=g.getSvgString();a("#svg_source_textarea").val(C);a("#svg_source_editor").fadeIn();a("#svg_source_textarea").focus().select()}},Db=function(){if(ja){if(g.setSvgString(a("#svg_source_textarea").val())){g.clearSelection();z();vb();pa()}else a.confirm(uiStrings.notification.QerrorsRevertToSource,function(m){if(!m)return false;g.clearSelection();z();vb();pa()});ba()}},eb=b.setIcon=function(m,w){var C=typeof w==="string"?a.getSvgIcon(w,true):w.clone();C?a(m).find("img").replaceWith(C):console.log("NOTE: Icon image missing: "+
|
a("#svg_source_editor").fadeIn();a("#svg_source_textarea").focus().select()}},Db=function(){if(ja){if(g.setSvgString(a("#svg_source_textarea").val())){g.clearSelection();z();vb();pa()}else a.confirm(uiStrings.notification.QerrorsRevertToSource,function(m){if(!m)return false;g.clearSelection();z();vb();pa()});ba()}},eb=b.setIcon=function(m,w){var C=typeof w==="string"?a.getSvgIcon(w,true):w.clone();C?a(m).find("img").replaceWith(C):console.log("NOTE: Icon image missing: "+w)},Gb;Gb=function(){var m=
|
||||||
w)},Gb;Gb=function(){var m=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,w=document.getElementsByTagName("script")[0],C;for(C in w.style)if(m.test(C))return C.match(m)[0];if("WebkitOpacity"in w.style)return"Webkit";if("KhtmlOpacity"in w.style)return"Khtml";return""}();var e=function(m,w){Gb.toLowerCase();var C=["top","left","bottom","right"];m.each(function(){for(var I=a(this),S=I.outerWidth()*(w-1),Q=I.outerHeight()*(w-1),V=0;V<4;V++){var aa=C[V],fa=I.data("orig_margin-"+aa);if(fa==null){fa=parseInt(I.css("margin-"+
|
/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,w=document.getElementsByTagName("script")[0],C;for(C in w.style)if(m.test(C))return C.match(m)[0];if("WebkitOpacity"in w.style)return"Webkit";if("KhtmlOpacity"in w.style)return"Khtml";return""}();var e=function(m,w){Gb.toLowerCase();var C=["top","left","bottom","right"];m.each(function(){for(var I=a(this),S=I.outerWidth()*(w-1),Q=I.outerHeight()*(w-1),V=0;V<4;V++){var aa=C[V],fa=I.data("orig_margin-"+aa);if(fa==null){fa=parseInt(I.css("margin-"+aa));I.data("orig_margin-"+
|
||||||
aa));I.data("orig_margin-"+aa,fa)}fa=fa*w;if(aa==="right")fa+=S;else if(aa==="bottom")fa+=Q;I.css("margin-"+aa,fa)}})},h=b.setIconSize=function(m,w){if(!(m==s.size&&!w)){var C=a("#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout"),I=1;I=typeof m=="number"?m:{s:0.75,m:1,l:1.25,xl:1.5}[m];b.tool_scale=ha=I;Ca();var S=C.parents(":hidden");S.css("visibility",
|
aa,fa)}fa=fa*w;if(aa==="right")fa+=S;else if(aa==="bottom")fa+=Q;I.css("margin-"+aa,fa)}})},h=b.setIconSize=function(m,w){if(!(m==s.size&&!w)){var C=a("#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout"),I=1;I=typeof m=="number"?m:{s:0.75,m:1,l:1.25,xl:1.5}[m];b.tool_scale=ha=I;Ca();var S=C.parents(":hidden");S.css("visibility","hidden").show();e(C,
|
||||||
"hidden").show();e(C,I);S.css("visibility","visible").hide();C=a("#tool_size_rules");if(C.length)C.empty();else C=a('<style id="tool_size_rules"></style>').appendTo("head");if(m!="m"){var Q="";a.each(cssResizeRules,function(V,aa){V="#svg_editor "+V.replace(/,/g,", #svg_editor");Q+=V+"{";a.each(aa,function(fa,qa){if(typeof qa==="number")var sa=qa*I+"px";else if(qa[m]||qa.all)sa=qa[m]||qa.all;Q+=fa+":"+sa+";"});Q+="}"});S="-"+Gb.toLowerCase()+"-";Q+="#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout{"+
|
I);S.css("visibility","visible").hide();C=a("#tool_size_rules");if(C.length)C.empty();else C=a('<style id="tool_size_rules"></style>').appendTo("head");if(m!="m"){var Q="";a.each(cssResizeRules,function(V,aa){V="#svg_editor "+V.replace(/,/g,", #svg_editor");Q+=V+"{";a.each(aa,function(fa,qa){if(typeof qa==="number")var sa=qa*I+"px";else if(qa[m]||qa.all)sa=qa[m]||qa.all;Q+=fa+":"+sa+";"});Q+="}"});S="-"+Gb.toLowerCase()+"-";Q+="#tools_top .toolset, #editor_panel > *, #history_panel > *,\t\t\t\t#main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\t\t\t\t#g_panel > *, #tool_font_size > *, .tools_flyout{"+
|
||||||
S+"transform: scale("+I+");} #svg_editor div.toolset .toolset {"+S+"transform: scale(1); margin: 1px !important;} #svg_editor .ui-slider {"+S+"transform: scale("+1/I+");}";C.text(Q)}Ca()}},l=function(){a("#dialog_box").hide();if(ja){if(ja)ga!==a("#svg_source_textarea").val()?a.confirm(uiStrings.notification.QignoreSourceChanges,function(m){m&&z()}):z();v()}else da&&g.leaveContext()},z=function(){a("#svg_source_editor").hide();ja=false;a("#svg_source_textarea").blur()};a(window).width();a(window).height();
|
S+"transform: scale("+I+");} #svg_editor div.toolset .toolset {"+S+"transform: scale(1); margin: 1px !important;} #svg_editor .ui-slider {"+S+"transform: scale("+1/I+");}";C.text(Q)}Ca()}},l=function(){a("#dialog_box").hide();if(ja){if(ja)ga!==a("#svg_source_textarea").val()?a.confirm(uiStrings.notification.QignoreSourceChanges,function(m){m&&z()}):z();v()}else da&&g.leaveContext()},z=function(){a("#svg_source_editor").hide();ja=false;a("#svg_source_textarea").blur()};a(window).width();a(window).height();
|
||||||
var v=a.noop;a(window).resize(function(){H()});(function(){R.scroll(function(){if(a("#ruler_x").length!=0)a("#ruler_x")[0].scrollLeft=R[0].scrollLeft;if(a("#ruler_y").length!=0)a("#ruler_y")[0].scrollTop=R[0].scrollTop})})();a("#url_notice").click(function(){a.alert(this.title)});a("#change_image_url").click(function(){var m=g.getHref(Y);m=m.indexOf("data:")===0?"":m;a.prompt(uiStrings.notification.enterNewImgURL,m,function(w){w&&Ea(w)})});var G=function(m){var w=m[0].id=="stroke_color"?"stroke":
|
var v=a.noop;a(window).resize(function(){H()});(function(){R.scroll(function(){if(a("#ruler_x").length!=0)a("#ruler_x")[0].scrollLeft=R[0].scrollLeft;if(a("#ruler_y").length!=0)a("#ruler_y")[0].scrollTop=R[0].scrollTop})})();a("#url_notice").click(function(){a.alert(this.title)});a("#change_image_url").click(function(){var m=g.getHref(Y);m=m.indexOf("data:")===0?"":m;a.prompt(uiStrings.notification.enterNewImgURL,m,function(w){w&&Ea(w)})});var G=function(m){var w=m[0].id=="stroke_color"?"stroke":
|
||||||
"fill",C=m[0].id=="canvas_color";if(C)w="canvas";var I=b.paintBox[w].paint;m=w=="stroke"?"Pick a Stroke Paint and Opacity":"Pick a Fill Paint and Opacity";C=C?{right:175,top:50}:{left:50,bottom:50};a("#color_picker").draggable({cancel:".jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker",containment:"window"}).removeAttr("style").css(C).jGraduate({paint:I,window:{pickerTitle:m},images:{clientPath:curConfig.jGraduatePath},newstop:"inverse"},function(S){I=new a.jGraduate.Paint(S);b.paintBox[w].setPaint(I);
|
"fill",C=m[0].id=="canvas_color";if(C)w="canvas";var I=b.paintBox[w].paint;m=w=="stroke"?"Pick a Stroke Paint and Opacity":"Pick a Fill Paint and Opacity";C=C?{right:175,top:50}:{left:50,bottom:50};a("#color_picker").draggable({cancel:".jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker",containment:"window"}).removeAttr("style").css(C).jGraduate({paint:I,window:{pickerTitle:m},images:{clientPath:curConfig.jGraduatePath},newstop:"inverse"},function(S){I=new a.jGraduate.Paint(S);b.paintBox[w].setPaint(I);
|
||||||
|
|
Loading…
Reference in New Issue