diff --git a/editor/svg-editor.css b/editor/svg-editor.css index cfa3abb..c1b6187 100644 --- a/editor/svg-editor.css +++ b/editor/svg-editor.css @@ -978,17 +978,20 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), } #tool_bold, #tool_italic { - font: bold 2.1em/1.1em serif; + font: bold 40px/85px serif; text-align: center; - padding: 0 2px 5px 2px; position: relative; float:left; - margin: 5px 10px 0 0; + padding: 0 0 0 0; color: #ccc; - background: #2f2f2c; - border: solid #3f3f3c 1px; + background: transparent; + border: none; + width: 100%; + height: 70px; + margin: 0; } + #tool_bold:hover, #tool_italic:hover { color: #fff; } @@ -1817,6 +1820,32 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), cursor: -moz-drag; } +.draginput.twocol { + width: 145px; +} + +#tool_font_family .caret { + right: 10px; + top: 55%; +} + +#preview_font { + font-size: 24px; + color: #fff; + margin: 30px 0 0 10px; +} + +#preview_font:after { + content: ''; + position: absolute; + right: 0; + top: 3px; + bottom: 3px; + width: 40px; + border-right: solid #3f3f3c 10px; + background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzU4MCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj48c3RvcCBzdG9wLWNvbG9yPSIjM2YzZjNjIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMzZjNmM2MiIG9mZnNldD0iMC43Ii8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c1ODApIiAvPjwvc3ZnPg==); +} + .draginput input:active { cursor: url(images/dragging.png), move; cursor: -webkit-dragging; @@ -1854,6 +1883,8 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), width: 100%; margin: 0; z-index: 1; + top: 0; + left: 0; } diff --git a/editor/svg-editor.html b/editor/svg-editor.html index fbdbe1c..59c88ca 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -307,38 +307,42 @@ $(function(){ Y -
- - - - -
-
-
B
-
i
-
+ + + + - diff --git a/editor/svg-editor.js b/editor/svg-editor.js index d176234..f4b11db 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -47,7 +47,7 @@ showRulers: (svgedit.browser.isTouch()) ? false : true, show_outside_canvas: false, no_save_warning: true, - initFont: 'Sans-serif' + initFont: 'Helvetica, Arial, sans-serif' }, uiStrings = Editor.uiStrings = { common: { @@ -2053,9 +2053,11 @@ } } - Editor.addDropDown('#font_family_dropdown', function() { - var fam = $(this).text(); - $('#font_family').val($(this).text()).change(); + $('#font_family_dropdown').change(function() { + var fam = this.options[this.selectedIndex].value + var fam_display = this.options[this.selectedIndex].text + $('#preview_font').html(fam_display).css("font-family", fam); + $('#font_family').val(fam).change(); }); $('div', '#position_opts').each(function(){ diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index bf69a2c..efa6738 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -228,7 +228,7 @@ $.extend(all_properties.text, { fill: "#000000", stroke_width: 0, font_size: 24, - font_family: 'Junction' + font_family: 'Helvetica, Arial, sans-serif' }); // Current shape style properties diff --git a/editor/svgedit.compiled.css b/editor/svgedit.compiled.css index b0ed85e..6c06994 100644 --- a/editor/svgedit.compiled.css +++ b/editor/svgedit.compiled.css @@ -249,7 +249,7 @@ input[type=submit]:active,button:active{padding:6px 10px 4px 10px;box-shadow:ins #tool_open input,#tool_import input,#tool_image input{position:absolute;opacity:0;font-size:10em;top:-5px;right:-5px;margin:0;cursor:pointer} .disabled{opacity:.5;cursor:default} .width_label{padding-right:5px} -#tool_bold,#tool_italic{font:bold 2.1em/1.1em serif;text-align:center;padding:0 2px 5px 2px;position:relative;float:left;margin:5px 10px 0 0;color:#ccc;background:#2f2f2c;border:solid #3f3f3c 1px} +#tool_bold,#tool_italic{font:bold 40px/85px serif;text-align:center;position:relative;float:left;padding:0;color:#ccc;background:transparent;border:0;width:100%;height:70px;margin:0} #tool_bold:hover,#tool_italic:hover{color:#fff} #text{position:absolute;left:-9999px} #tool_bold span,#tool_italic span{position:absolute;width:100%;height:100%;top:0;left:0;background:#ccc;opacity:0} @@ -385,12 +385,16 @@ button.cancel,input.Cancel,input.cancel,input.jGraduate_Cancel,button.cancel{-we .touch .draginput.active:after{content:attr(data-value);display:block;position:absolute;background:#fff;font-size:16px;top:0;width:30px;left:-50px;padding:0 5px;color:#333;z-index:10;font-family:sans-serif;font-weight:bold;text-align:right;padding-right:10px;height:20px;line-height:20px;letter-spacing:-1px} .touch .draginput.active:before{content:'';height:0;width:0;position:absolute;top:5px;left:-5px;border:solid transparent 5px;border-left-color:#fff} .draginput input{border:0;background:transparent;font:24px/normal sans-serif;text-align:center;color:#4f80ff;padding:30px 0 16px;width:100%;height:24px;position:relative;z-index:2;cursor:url(images/drag.png),move;cursor:-webkit-drag;cursor:-moz-drag} +.draginput.twocol{width:145px} +#tool_font_family .caret{right:10px;top:55%} +#preview_font{font-size:24px;color:#fff;margin:30px 0 0 10px} +#preview_font:after{content:'';position:absolute;right:0;top:3px;bottom:3px;width:40px;border-right:solid #3f3f3c 10px;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzU4MCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj48c3RvcCBzdG9wLWNvbG9yPSIjM2YzZjNjIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMzZjNmM2MiIG9mZnNldD0iMC43Ii8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c1ODApIiAvPjwvc3ZnPg==)} .draginput input:active{cursor:url(images/dragging.png),move;cursor:-webkit-dragging;cursor:-moz-dragging} .draginput span{font:11px/130% sans-serif;color:#ccc;display:block;position:absolute;top:5px;left:5px;text-align:left} .draginput.error{background:#900} .draginput.error input{color:#fff} .draginput.stroke_tool{text-align:center} -.draginput select{-webkit-appearance:none;opacity:0;display:block;position:absolute;height:100%;width:100%;margin:0;z-index:1} +.draginput select{-webkit-appearance:none;opacity:0;display:block;position:absolute;height:100%;width:100%;margin:0;z-index:1;top:0;left:0} .draginput_cursor{position:absolute;top:50%;width:100%;border-top:solid rgba(50,100,200,0.25) 3px;margin-top:-2px;z-index:0} .draginput input[readonly=readonly]{-webkit-appearance:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} .draginput input:focus{background:#4f80ff;color:#fff;outline:0;box-shadow:0 0 5px 2px #4f80ff} diff --git a/editor/svgedit.compiled.js b/editor/svgedit.compiled.js index 3f72585..65d45de 100644 --- a/editor/svgedit.compiled.js +++ b/editor/svgedit.compiled.js @@ -198,7 +198,7 @@ $.SvgCanvas=function(a,p){function g(e,h){for(var l=svgedit.utilities.getBBox(e) G=G.cloneNode(true);$(G).attr(F);G.id=ja();mb().appendChild(G);e.setAttribute(v,"url(#"+G.id+")")}}}}var c="http://www.w3.org/2000/svg",m={show_outside_canvas:true,selectNew:true,dimensions:[640,480]};p&&$.extend(m,p);var s=m.dimensions,b=this,f=a.ownerDocument,d=f.importNode(svgedit.utilities.text2xml('').documentElement, true);a.appendChild(d);var k=f.createElementNS(c,"svg");(b.clearSvgContentElement=function(){for(;k.firstChild;)k.removeChild(k.firstChild);$(k).attr({id:"svgcontent",width:s[0],height:s[1],x:s[0],y:s[1],overflow:m.show_outside_canvas?"visible":"hidden",xmlns:c,"xmlns:se":"http://svg-edit.googlecode.com","xmlns:xlink":"http://www.w3.org/1999/xlink"}).appendTo(d);var e=f.createComment(" Created with Method Draw - http://github.com/duopixel/Method-Draw/ ");k.appendChild(e)})();var q="svg_";b.setIdPrefix= function(e){q=e};b.current_drawing_=new svgedit.draw.Drawing(k,q);var B=b.getCurrentDrawing=function(){return b.current_drawing_},o=1,J=null,U={shape:{fill:(m.initFill.color=="none"?"":"#")+m.initFill.color,fill_paint:null,fill_opacity:m.initFill.opacity,stroke:"#"+m.initStroke.color,stroke_paint:null,stroke_opacity:m.initStroke.opacity,stroke_width:m.initStroke.width,stroke_dasharray:"none",stroke_linejoin:"miter",stroke_linecap:"butt",opacity:m.initOpacity}};U.text=$.extend(true,{},U.shape);$.extend(U.text, -{fill:"#000000",stroke_width:0,font_size:24,font_family:"Junction"});var M=U.shape,I=Array(1),S=this.addSvgElementFromJson=function(e){var h=svgedit.utilities.getElem(e.attr.id),l=B().getCurrentLayer();if(h&&e.element!=h.tagName){l.removeChild(h);h=null}if(!h){h=f.createElementNS(c,e.element);if(l)(J||l).appendChild(h)}e.curStyles&&svgedit.utilities.assignAttributes(h,{fill:M.fill,stroke:M.stroke,"stroke-width":M.stroke_width,"stroke-dasharray":M.stroke_dasharray,"stroke-linejoin":M.stroke_linejoin, +{fill:"#000000",stroke_width:0,font_size:24,font_family:"Helvetica, Arial, sans-serif"});var M=U.shape,I=Array(1),S=this.addSvgElementFromJson=function(e){var h=svgedit.utilities.getElem(e.attr.id),l=B().getCurrentLayer();if(h&&e.element!=h.tagName){l.removeChild(h);h=null}if(!h){h=f.createElementNS(c,e.element);if(l)(J||l).appendChild(h)}e.curStyles&&svgedit.utilities.assignAttributes(h,{fill:M.fill,stroke:M.stroke,"stroke-width":M.stroke_width,"stroke-dasharray":M.stroke_dasharray,"stroke-linejoin":M.stroke_linejoin, "stroke-linecap":M.stroke_linecap,"stroke-opacity":M.stroke_opacity,"fill-opacity":M.fill_opacity,opacity:M.opacity/2,style:"pointer-events:inherit"},100);svgedit.utilities.assignAttributes(h,e.attr,100);svgedit.utilities.cleanupElement(h);return h},Y=b.getTransformList=svgedit.transformlist.getTransformList,P=svgedit.math.transformPoint,ia=b.matrixMultiply=svgedit.math.matrixMultiply,qa=b.hasMatrixTransform=svgedit.math.hasMatrixTransform,ga=b.transformListToTransform=svgedit.math.transformListToTransform, ba=svgedit.math.snapToAngle,W=svgedit.math.getMatrix;svgedit.units.init({getBaseUnit:function(){return m.baseUnit},getElement:svgedit.utilities.getElem,getHeight:function(){return k.getAttribute("height")/o},getWidth:function(){return k.getAttribute("width")/o},getRoundDigits:function(){return hb.round_digits}});var ta=b.convertToNum=svgedit.units.convertToNum;svgedit.utilities.init({getDOMDocument:function(){return f},getDOMContainer:function(){return a},getSVGRoot:function(){return d},getSelectedElements:function(){return I}, getSVGContent:function(){return k}});var ka=b.getUrlFromAttr=svgedit.utilities.getUrlFromAttr,da=b.getHref=svgedit.utilities.getHref,X=b.setHref=svgedit.utilities.setHref,Z=svgedit.utilities.getPathBBox;b.getBBox=svgedit.utilities.getBBox;var oa=b.getRotationAngle=svgedit.utilities.getRotationAngle,ra=b.getElem=svgedit.utilities.getElem,ma=b.assignAttributes=svgedit.utilities.assignAttributes,na=this.cleanupElement=svgedit.utilities.cleanupElement,Ca=svgedit.sanitize.getNSMap(),Ga=b.sanitizeSvg=svgedit.sanitize.sanitizeSvg, @@ -374,8 +374,8 @@ var E=l[D];u[D]=0;F[D]=0;switch(e){case "l":u[D]=z-E.x;break;case "c":u[D]=(z+v) z.setAttribute("fill",e);if(h){if(!v){v=f.createElementNS(c,"image");ma(v,{id:"background_image",width:"100%",height:"100%",preserveAspectRatio:"xMinYMin",style:"pointer-events:none"})}X(v,h);l.appendChild(v)}else v&&v.parentNode.removeChild(v)};this.cycleElement=function(e){var h=I[0],l=false,z=vb(J||B().getCurrentLayer());if(z.length){if(h==null){e=e?z.length-1:0;l=z[e]}else for(var v=z.length;v--;)if(z[v]==h){e=e?v-1:v+1;if(e>=z.length)e=0;else if(e<0)e=z.length-1;l=z[e];break}Bb([l],true);O("selected", I)}};this.clear();this.getPrivateMethods=function(){return{addCommandToHistory:za,setGradient:Rb,addSvgElementFromJson:S,assignAttributes:ma,BatchCommand:Ba,call:O,ChangeElementCommand:Oa,copyElem:la,ffClone:ea,findDefs:mb,findDuplicateGradient:Qb,getElem:ra,getId:ca,getIntersectionList:ub,getMouseTarget:Kb,getNextId:ja,getPathBBox:Z,getUrlFromAttr:ka,hasMatrixTransform:qa,identifyLayers:Gb,InsertElementCommand:Da,isIdentity:svgedit.math.isIdentity,logMatrix:Xa,matrixMultiply:ia,MoveElementCommand:Ja, preventClickDefault:qb,recalculateAllSelectedDimensions:Ha,recalculateDimensions:Wa,remapElement:fb,RemoveElementCommand:La,removeUnusedDefElems:Mb,round:gb,runExtensions:pb,sanitizeSvg:Ga,SVGEditTransformList:svgedit.transformlist.SVGTransformList,toString:toString,transformBox:svgedit.math.transformBox,transformListToTransform:ga,transformPoint:P,walkTree:svgedit.utilities.walkTree}}};(function(){document.addEventListener("touchstart",touchHandler,true);document.addEventListener("touchmove",touchHandler,true);document.addEventListener("touchend",touchHandler,true);document.addEventListener("touchcancel",touchHandler,true);if(!window.svgEditor)window.svgEditor=function(a){function p(d,k){var q=g.setSvgString(d)!==false;k=k||a.noop;q?k(true):a.alert(uiStrings.notification.errorLoadingSVG,function(){k(false)})}var g,c={},m=false;curConfig={canvas_expansion:1,dimensions:[580,400], -initFill:{color:"fff",opacity:1},initStroke:{width:1.5,color:"000",opacity:1},initOpacity:1,imgPath:"images/",extPath:"extensions/",jGraduatePath:"jgraduate/images/",extensions:[],initTool:"select",wireframe:false,colorPickerCSS:false,gridSnapping:false,gridColor:"#000",baseUnit:"px",snappingStep:10,showRulers:svgedit.browser.isTouch()?false:true,show_outside_canvas:false,no_save_warning:true,initFont:"Sans-serif"};uiStrings=c.uiStrings={common:{ok:"OK",cancel:"Cancel",key_up:"Up",key_down:"Down", -key_backspace:"Backspace",key_del:"Del"},layers:{layer:"Layer"},notification:{invalidAttrValGiven:"Invalid value given",noContentToFitTo:"No content to fit to",dupeLayerName:"There is already a layer named that!",enterUniqueLayerName:"Please enter a unique layer name",enterNewLayerName:"Please enter the new layer name",layerHasThatName:"Layer already has that name",QmoveElemsToLayer:'Move selected elements to layer "%s"?',QwantToClear:"Do you want to clear the drawing?\nThis will also erase your undo history!", +initFill:{color:"fff",opacity:1},initStroke:{width:1.5,color:"000",opacity:1},initOpacity:1,imgPath:"images/",extPath:"extensions/",jGraduatePath:"jgraduate/images/",extensions:[],initTool:"select",wireframe:false,colorPickerCSS:false,gridSnapping:false,gridColor:"#000",baseUnit:"px",snappingStep:10,showRulers:svgedit.browser.isTouch()?false:true,show_outside_canvas:false,no_save_warning:true,initFont:"Helvetica, Arial, sans-serif"};uiStrings=c.uiStrings={common:{ok:"OK",cancel:"Cancel",key_up:"Up", +key_down:"Down",key_backspace:"Backspace",key_del:"Del"},layers:{layer:"Layer"},notification:{invalidAttrValGiven:"Invalid value given",noContentToFitTo:"No content to fit to",dupeLayerName:"There is already a layer named that!",enterUniqueLayerName:"Please enter a unique layer name",enterNewLayerName:"Please enter the new layer name",layerHasThatName:"Layer already has that name",QmoveElemsToLayer:'Move selected elements to layer "%s"?',QwantToClear:"Do you want to clear the drawing?\nThis will also erase your undo history!", QwantToOpen:"Do you want to open a new file?\nThis will also erase your undo history!",QerrorsRevertToSource:"There were parsing errors in your SVG source.\nRevert back to original SVG source?",QignoreSourceChanges:"Ignore changes made to SVG source?",featNotSupported:"Feature not supported",enterNewImgURL:"Enter the new image URL",defsFailOnSave:"NOTE: Due to a bug in your browser, this image may appear wrong (missing gradients or elements). It will however appear correct once actually saved.",loadingImage:"Loading image, please wait...", saveFromBrowser:'Select "Save As..." in your browser to save this image as a %s file.',noteTheseIssues:"Also note the following issues: ",unsavedChanges:"There are unsaved changes.",enterNewLinkURL:"Enter the new hyperlink URL",errorLoadingSVG:"Error: Unable to load SVG data",URLloadFail:"Unable to load from URL",retrieving:'Retrieving "%s" ...'}};var s={},b={};c.curConfig=curConfig;c.tool_scale=1;c.setConfig=function(d){a.each(d,function(k,q){k in defaultPrefs&&a.pref(k,q)});a.extend(true,curConfig, d);if(d.extensions)curConfig.extensions=d.extensions};c.setCustomHandlers=function(d){c.ready(function(){if(d.open){a('#tool_open > input[type="file"]').remove();a("#tool_open").show();g.open=d.open}if(d.save){c.show_save_warning=false;g.bind("saved",d.save)}d.pngsave&&g.bind("exported",d.pngsave);b=d})};c.randomizeIds=function(){g.randomizeIds(arguments)};c.init=function(){function d(n,w){var C=n.id,K=C.split("_"),R=K[0];K=K[1];w&&g.setStrokeAttr("stroke-"+R,K);rb();db("#cur_"+R,C,20);a(n).addClass("current").siblings().removeClass("current")} @@ -438,14 +438,14 @@ Q.originalEvent.touches.length>=2){K=true;n=Q.clientX;w=Q.clientY;return false}} zoom}zoom&&xa({value:zoom})}});a(".menu_title").on("mousedown",function(){a("#tools_shapelib").hide();a("#menu_bar").toggleClass("active");jb.removeClass("open");a(this).parent().addClass("open")}).on("mouseover",function(){jb.removeClass("open");a(this).parent().addClass("open")});c.addDropDown=function(n,w,C){if(a(n).length!=0){var K=a(n).find("button"),R=a(n).find("ul").attr("id",a(n)[0].id+"-list");C||a("#option_lists").append(R);var Q=false;C&&a(n).addClass("dropup");R.find("li").bind("mouseup", w);a(window).mouseup(function(){if(!Q){K.removeClass("down");R.hide()}Q=false});K.bind("mousedown",function(){if(K.hasClass("down")){K.removeClass("down");R.hide()}else{K.addClass("down");if(!C){var V=a(n).offset();R.css({top:V.top,left:V.left-110})}R.show();Q=true}}).hover(function(){Q=true}).mouseout(function(){Q=false})}};var Ea=function(n,w,C,K){var R=a(n);w=a(w);var Q=false,V=K.dropUp;V&&a(n).addClass("dropup");w.find("li").bind("mouseup",function(){if(K.seticon){db("#cur_"+R[0].id,a(this).children()); a(this).addClass("current").siblings().removeClass("current")}C.apply(this,arguments)});a(window).mouseup(function(){if(!Q){R.removeClass("down");w.hide();w.css({top:0,left:0})}Q=false});w.height();a(n).bind("mousedown",function(){var aa=a(n).offset();if(V){aa.top-=w.height();aa.left+=8}else aa.top+=a(n).height();a(w).offset(aa);if(R.hasClass("down")){R.removeClass("down");w.hide();w.css({top:0,left:0})}else{R.addClass("down");w.show();Q=true;return false}}).hover(function(){Q=true}).mouseout(function(){Q= -false});K.multiclick&&w.mousedown(function(){Q=true})};c.addDropDown("#font_family_dropdown",function(){a(this).text();a("#font_family").val(a(this).text()).change()});a("div","#position_opts").each(function(){this.addEventListener("mouseup",function(){var n=this.id.replace("tool_pos","").charAt(0);g.alignSelectedElements(n,"page")})});(function(){var n,w=function(){a(n).blur()};a("#svg_editor").find("button, select, input:not(#text)").focus(function(){n=this;qa="toolbars";S.mousedown(w)}).blur(function(){qa= -"canvas";S.unbind("mousedown",w);g.getMode()=="textedit"&&a("#text").focus()})})();var wa=function(){$a("#tool_select")&&g.setMode("select")},hb=function(){$a("#tool_fhpath")&&g.setMode("fhpath")},Ma=function(){$a("#tool_line")&&g.setMode("line")},Ta=function(){$a("#tool_rect")&&g.setMode("rect")},Fa=function(){$a("#tool_ellipse")&&g.setMode("ellipse")},lb=function(){$a("#tool_image")&&g.setMode("image")},tb=function(){$a("#tool_zoom")&&g.setMode("zoom")},Ya=function(){if($a("#tool_zoom")){Fb();ba()}}, -bb=function(){$a("#tool_text")&&g.setMode("text")},Cb=function(){$a("#tool_path")&&g.setMode("path")},ua=function(){if(W!=null||ta)g.deleteSelectedElements()},nb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.cutSelectedElements()}},kb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.copySelectedElements()}},zb=function(){window.event.type==="keydown"&&qb(a("#edit_menu"));var n=g.getZoom(),w=(S[0].scrollLeft+S.width()/2)/n-g.contentW; -n=(S[0].scrollTop+S.height()/2)/n-g.contentH;g.pasteElements("point",w,n)},pb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToTopSelectedElement()}},gb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToBottomSelectedElement()}},ub=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected("Up")}},vb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected("Down")}}, -xb=function(n){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected(n)}},Ab=function(){if(W!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");J.toEditMode(elems[0]);g.clearSelection()}},la=function(){W!=null&&J.reorient()},ca=function(){if(W!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://",function(n){n&&g.makeHyperlink(n)})},ja=function(n, -w){if(W!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;n*=C;w*=C}a("input").blur();g.moveSelectedElements(n,w)}},O=function(){var n=!a("#tool_node_link").hasClass("checked");n?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);J.linkControlPoints(n)},T=function(){J.getNodePoint()&&J.clonePathNode()},ea=function(){J.getNodePoint()&&J.deletePathNode()},Ha=function(){var n= -a("#tool_add_subpath"),w=!n.hasClass("push_button_pressed");w?n.addClass("push_button_pressed").removeClass("tool_button"):n.removeClass("push_button_pressed").addClass("tool_button");J.addSubPath(w)},Pa=function(){J.opencloseSubPath()},Xa=function(){g.cycleElement(1)},fb=function(){g.cycleElement(0)},ob=function(n,w){if(!(W==null||ta)){n||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);Ba()}},Wa=function(){var n=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear,function(w){if(w){ba(); -g.clear();g.setResolution(n[0],n[1]);H(true);Fb();Ba();Z();g.runExtensions("onNewDocument")}})},sb=function(){g.setBold(!g.getBold());Ba();return false},Qa=function(){g.setItalic(!g.getItalic());Ba();return false},wb=function(){if(!b.pngsave){var n=uiStrings.notification.loadingImage;P=window.open("data:text/html;charset=utf-8,"+n+"

"+n+"

")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})}, +false});K.multiclick&&w.mousedown(function(){Q=true})};a("#font_family_dropdown").change(function(){var n=this.options[this.selectedIndex].value,w=this.options[this.selectedIndex].text;a("#preview_font").html(w).css("font-family",n);a("#font_family").val(n).change()});a("div","#position_opts").each(function(){this.addEventListener("mouseup",function(){var n=this.id.replace("tool_pos","").charAt(0);g.alignSelectedElements(n,"page")})});(function(){var n,w=function(){a(n).blur()};a("#svg_editor").find("button, select, input:not(#text)").focus(function(){n= +this;qa="toolbars";S.mousedown(w)}).blur(function(){qa="canvas";S.unbind("mousedown",w);g.getMode()=="textedit"&&a("#text").focus()})})();var wa=function(){$a("#tool_select")&&g.setMode("select")},hb=function(){$a("#tool_fhpath")&&g.setMode("fhpath")},Ma=function(){$a("#tool_line")&&g.setMode("line")},Ta=function(){$a("#tool_rect")&&g.setMode("rect")},Fa=function(){$a("#tool_ellipse")&&g.setMode("ellipse")},lb=function(){$a("#tool_image")&&g.setMode("image")},tb=function(){$a("#tool_zoom")&&g.setMode("zoom")}, +Ya=function(){if($a("#tool_zoom")){Fb();ba()}},bb=function(){$a("#tool_text")&&g.setMode("text")},Cb=function(){$a("#tool_path")&&g.setMode("path")},ua=function(){if(W!=null||ta)g.deleteSelectedElements()},nb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.cutSelectedElements()}},kb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.copySelectedElements()}},zb=function(){window.event.type==="keydown"&&qb(a("#edit_menu"));var n=g.getZoom(), +w=(S[0].scrollLeft+S.width()/2)/n-g.contentW;n=(S[0].scrollTop+S.height()/2)/n-g.contentH;g.pasteElements("point",w,n)},pb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToTopSelectedElement()}},gb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToBottomSelectedElement()}},ub=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected("Up")}},vb=function(){if(W!=null){window.event.type==="keydown"&& +qb(a("#object_menu"));g.moveUpDownSelected("Down")}},xb=function(n){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected(n)}},Ab=function(){if(W!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");J.toEditMode(elems[0]);g.clearSelection()}},la=function(){W!=null&&J.reorient()},ca=function(){if(W!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://", +function(n){n&&g.makeHyperlink(n)})},ja=function(n,w){if(W!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;n*=C;w*=C}a("input").blur();g.moveSelectedElements(n,w)}},O=function(){var n=!a("#tool_node_link").hasClass("checked");n?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);J.linkControlPoints(n)},T=function(){J.getNodePoint()&&J.clonePathNode()},ea=function(){J.getNodePoint()&& +J.deletePathNode()},Ha=function(){var n=a("#tool_add_subpath"),w=!n.hasClass("push_button_pressed");w?n.addClass("push_button_pressed").removeClass("tool_button"):n.removeClass("push_button_pressed").addClass("tool_button");J.addSubPath(w)},Pa=function(){J.opencloseSubPath()},Xa=function(){g.cycleElement(1)},fb=function(){g.cycleElement(0)},ob=function(n,w){if(!(W==null||ta)){n||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);Ba()}},Wa=function(){var n=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear, +function(w){if(w){ba();g.clear();g.setResolution(n[0],n[1]);H(true);Fb();Ba();Z();g.runExtensions("onNewDocument")}})},sb=function(){g.setBold(!g.getBold());Ba();return false},Qa=function(){g.setItalic(!g.getItalic());Ba();return false},wb=function(){if(!b.pngsave){var n=uiStrings.notification.loadingImage;P=window.open("data:text/html;charset=utf-8,"+n+"

"+n+"

")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})}, Bb=function(){g.open()},Kb=function(){},qb=function(n){var w=n.prev();w.css("background","#09f");setTimeout(function(){w.css("background","")},200)},ib=function(){if(U.getUndoStackSize()>0){window.event.type==="keydown"&&qb(a("#edit_menu"));U.undo()}},Ka=function(){if(U.getRedoStackSize()>0){window.event.type==="keydown"&&qb(a("#edit_menu"));U.redo()}},Mb=function(){if(ta)g.groupSelectedElements();else W&&g.ungroupSelectedElement()},Ob=function(){window.event.type==="keydown"&&qb(a("#edit_menu")); g.cloneSelectedElements(20,20)},Nb=function(){var n=this.id.replace("tool_align","").charAt(0);g.alignSelectedElements(n,a("#align_relative_to").val())},Pb=function(){var n=document.querySelector("#tool_stroke rect"),w=document.querySelector("#tool_fill rect"),C=w.getAttribute("fill"),K=n.getAttribute("fill");n=parseFloat(n.getAttribute("stroke-opacity"));if(isNaN(n))n=100;w=parseFloat(w.getAttribute("fill-opacity"));if(isNaN(w))w=100;K=Ja(K,n,"stroke");C=Ja(C,w,"fill");c.paintBox.fill.setPaint(K, true);c.paintBox.stroke.setPaint(C,true)},Fb=function(n){var w=g.getResolution();n=n?w.zoom*n:1;a("#zoom").val(n*100);g.setZoom(n);mb();H(true)},Gb=function(){!a("#tool_wireframe").hasClass("push_button_pressed")?a("#tool_wireframe").addClass("push_button_pressed"):a("#tool_wireframe").removeClass("push_button_pressed");S.toggleClass("wireframe");if(!A){var n=a("#wireframe_rules");n.length?n.empty():a('').appendTo("head");mb()}},Lb=function(){var n=!a("#tool_snap").hasClass("push_button_pressed"); diff --git a/editor/temp.css b/editor/temp.css index 760d875..4e5d831 100644 --- a/editor/temp.css +++ b/editor/temp.css @@ -1623,17 +1623,20 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), } #tool_bold, #tool_italic { - font: bold 2.1em/1.1em serif; + font: bold 40px/85px serif; text-align: center; - padding: 0 2px 5px 2px; position: relative; float:left; - margin: 5px 10px 0 0; + padding: 0 0 0 0; color: #ccc; - background: #2f2f2c; - border: solid #3f3f3c 1px; + background: transparent; + border: none; + width: 100%; + height: 70px; + margin: 0; } + #tool_bold:hover, #tool_italic:hover { color: #fff; } @@ -2462,6 +2465,32 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), cursor: -moz-drag; } +.draginput.twocol { + width: 145px; +} + +#tool_font_family .caret { + right: 10px; + top: 55%; +} + +#preview_font { + font-size: 24px; + color: #fff; + margin: 30px 0 0 10px; +} + +#preview_font:after { + content: ''; + position: absolute; + right: 0; + top: 3px; + bottom: 3px; + width: 40px; + border-right: solid #3f3f3c 10px; + background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzU4MCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj48c3RvcCBzdG9wLWNvbG9yPSIjM2YzZjNjIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMzZjNmM2MiIG9mZnNldD0iMC43Ii8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c1ODApIiAvPjwvc3ZnPg==); +} + .draginput input:active { cursor: url(images/dragging.png), move; cursor: -webkit-dragging; @@ -2499,6 +2528,8 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), width: 100%; margin: 0; z-index: 1; + top: 0; + left: 0; } diff --git a/method-draw/svg-editor.css b/method-draw/svg-editor.css index cfa3abb..c1b6187 100644 --- a/method-draw/svg-editor.css +++ b/method-draw/svg-editor.css @@ -978,17 +978,20 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), } #tool_bold, #tool_italic { - font: bold 2.1em/1.1em serif; + font: bold 40px/85px serif; text-align: center; - padding: 0 2px 5px 2px; position: relative; float:left; - margin: 5px 10px 0 0; + padding: 0 0 0 0; color: #ccc; - background: #2f2f2c; - border: solid #3f3f3c 1px; + background: transparent; + border: none; + width: 100%; + height: 70px; + margin: 0; } + #tool_bold:hover, #tool_italic:hover { color: #fff; } @@ -1817,6 +1820,32 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), cursor: -moz-drag; } +.draginput.twocol { + width: 145px; +} + +#tool_font_family .caret { + right: 10px; + top: 55%; +} + +#preview_font { + font-size: 24px; + color: #fff; + margin: 30px 0 0 10px; +} + +#preview_font:after { + content: ''; + position: absolute; + right: 0; + top: 3px; + bottom: 3px; + width: 40px; + border-right: solid #3f3f3c 10px; + background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzU4MCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj48c3RvcCBzdG9wLWNvbG9yPSIjM2YzZjNjIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMzZjNmM2MiIG9mZnNldD0iMC43Ii8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c1ODApIiAvPjwvc3ZnPg==); +} + .draginput input:active { cursor: url(images/dragging.png), move; cursor: -webkit-dragging; @@ -1854,6 +1883,8 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), width: 100%; margin: 0; z-index: 1; + top: 0; + left: 0; } diff --git a/method-draw/svg-editor.html b/method-draw/svg-editor.html index f21cdad..5858291 100644 --- a/method-draw/svg-editor.html +++ b/method-draw/svg-editor.html @@ -307,38 +307,42 @@ $(function(){ Y -
- - - - -
-
-
B
-
i
-
+ + + + - diff --git a/method-draw/svg-editor.js b/method-draw/svg-editor.js index d176234..f4b11db 100644 --- a/method-draw/svg-editor.js +++ b/method-draw/svg-editor.js @@ -47,7 +47,7 @@ showRulers: (svgedit.browser.isTouch()) ? false : true, show_outside_canvas: false, no_save_warning: true, - initFont: 'Sans-serif' + initFont: 'Helvetica, Arial, sans-serif' }, uiStrings = Editor.uiStrings = { common: { @@ -2053,9 +2053,11 @@ } } - Editor.addDropDown('#font_family_dropdown', function() { - var fam = $(this).text(); - $('#font_family').val($(this).text()).change(); + $('#font_family_dropdown').change(function() { + var fam = this.options[this.selectedIndex].value + var fam_display = this.options[this.selectedIndex].text + $('#preview_font').html(fam_display).css("font-family", fam); + $('#font_family').val(fam).change(); }); $('div', '#position_opts').each(function(){ diff --git a/method-draw/svgcanvas.js b/method-draw/svgcanvas.js index bf69a2c..efa6738 100644 --- a/method-draw/svgcanvas.js +++ b/method-draw/svgcanvas.js @@ -228,7 +228,7 @@ $.extend(all_properties.text, { fill: "#000000", stroke_width: 0, font_size: 24, - font_family: 'Junction' + font_family: 'Helvetica, Arial, sans-serif' }); // Current shape style properties diff --git a/method-draw/svgedit.compiled.css b/method-draw/svgedit.compiled.css index b0ed85e..6c06994 100644 --- a/method-draw/svgedit.compiled.css +++ b/method-draw/svgedit.compiled.css @@ -249,7 +249,7 @@ input[type=submit]:active,button:active{padding:6px 10px 4px 10px;box-shadow:ins #tool_open input,#tool_import input,#tool_image input{position:absolute;opacity:0;font-size:10em;top:-5px;right:-5px;margin:0;cursor:pointer} .disabled{opacity:.5;cursor:default} .width_label{padding-right:5px} -#tool_bold,#tool_italic{font:bold 2.1em/1.1em serif;text-align:center;padding:0 2px 5px 2px;position:relative;float:left;margin:5px 10px 0 0;color:#ccc;background:#2f2f2c;border:solid #3f3f3c 1px} +#tool_bold,#tool_italic{font:bold 40px/85px serif;text-align:center;position:relative;float:left;padding:0;color:#ccc;background:transparent;border:0;width:100%;height:70px;margin:0} #tool_bold:hover,#tool_italic:hover{color:#fff} #text{position:absolute;left:-9999px} #tool_bold span,#tool_italic span{position:absolute;width:100%;height:100%;top:0;left:0;background:#ccc;opacity:0} @@ -385,12 +385,16 @@ button.cancel,input.Cancel,input.cancel,input.jGraduate_Cancel,button.cancel{-we .touch .draginput.active:after{content:attr(data-value);display:block;position:absolute;background:#fff;font-size:16px;top:0;width:30px;left:-50px;padding:0 5px;color:#333;z-index:10;font-family:sans-serif;font-weight:bold;text-align:right;padding-right:10px;height:20px;line-height:20px;letter-spacing:-1px} .touch .draginput.active:before{content:'';height:0;width:0;position:absolute;top:5px;left:-5px;border:solid transparent 5px;border-left-color:#fff} .draginput input{border:0;background:transparent;font:24px/normal sans-serif;text-align:center;color:#4f80ff;padding:30px 0 16px;width:100%;height:24px;position:relative;z-index:2;cursor:url(images/drag.png),move;cursor:-webkit-drag;cursor:-moz-drag} +.draginput.twocol{width:145px} +#tool_font_family .caret{right:10px;top:55%} +#preview_font{font-size:24px;color:#fff;margin:30px 0 0 10px} +#preview_font:after{content:'';position:absolute;right:0;top:3px;bottom:3px;width:40px;border-right:solid #3f3f3c 10px;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzU4MCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj48c3RvcCBzdG9wLWNvbG9yPSIjM2YzZjNjIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMzZjNmM2MiIG9mZnNldD0iMC43Ii8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c1ODApIiAvPjwvc3ZnPg==)} .draginput input:active{cursor:url(images/dragging.png),move;cursor:-webkit-dragging;cursor:-moz-dragging} .draginput span{font:11px/130% sans-serif;color:#ccc;display:block;position:absolute;top:5px;left:5px;text-align:left} .draginput.error{background:#900} .draginput.error input{color:#fff} .draginput.stroke_tool{text-align:center} -.draginput select{-webkit-appearance:none;opacity:0;display:block;position:absolute;height:100%;width:100%;margin:0;z-index:1} +.draginput select{-webkit-appearance:none;opacity:0;display:block;position:absolute;height:100%;width:100%;margin:0;z-index:1;top:0;left:0} .draginput_cursor{position:absolute;top:50%;width:100%;border-top:solid rgba(50,100,200,0.25) 3px;margin-top:-2px;z-index:0} .draginput input[readonly=readonly]{-webkit-appearance:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} .draginput input:focus{background:#4f80ff;color:#fff;outline:0;box-shadow:0 0 5px 2px #4f80ff} diff --git a/method-draw/svgedit.compiled.js b/method-draw/svgedit.compiled.js index 3f72585..65d45de 100644 --- a/method-draw/svgedit.compiled.js +++ b/method-draw/svgedit.compiled.js @@ -198,7 +198,7 @@ $.SvgCanvas=function(a,p){function g(e,h){for(var l=svgedit.utilities.getBBox(e) G=G.cloneNode(true);$(G).attr(F);G.id=ja();mb().appendChild(G);e.setAttribute(v,"url(#"+G.id+")")}}}}var c="http://www.w3.org/2000/svg",m={show_outside_canvas:true,selectNew:true,dimensions:[640,480]};p&&$.extend(m,p);var s=m.dimensions,b=this,f=a.ownerDocument,d=f.importNode(svgedit.utilities.text2xml('').documentElement, true);a.appendChild(d);var k=f.createElementNS(c,"svg");(b.clearSvgContentElement=function(){for(;k.firstChild;)k.removeChild(k.firstChild);$(k).attr({id:"svgcontent",width:s[0],height:s[1],x:s[0],y:s[1],overflow:m.show_outside_canvas?"visible":"hidden",xmlns:c,"xmlns:se":"http://svg-edit.googlecode.com","xmlns:xlink":"http://www.w3.org/1999/xlink"}).appendTo(d);var e=f.createComment(" Created with Method Draw - http://github.com/duopixel/Method-Draw/ ");k.appendChild(e)})();var q="svg_";b.setIdPrefix= function(e){q=e};b.current_drawing_=new svgedit.draw.Drawing(k,q);var B=b.getCurrentDrawing=function(){return b.current_drawing_},o=1,J=null,U={shape:{fill:(m.initFill.color=="none"?"":"#")+m.initFill.color,fill_paint:null,fill_opacity:m.initFill.opacity,stroke:"#"+m.initStroke.color,stroke_paint:null,stroke_opacity:m.initStroke.opacity,stroke_width:m.initStroke.width,stroke_dasharray:"none",stroke_linejoin:"miter",stroke_linecap:"butt",opacity:m.initOpacity}};U.text=$.extend(true,{},U.shape);$.extend(U.text, -{fill:"#000000",stroke_width:0,font_size:24,font_family:"Junction"});var M=U.shape,I=Array(1),S=this.addSvgElementFromJson=function(e){var h=svgedit.utilities.getElem(e.attr.id),l=B().getCurrentLayer();if(h&&e.element!=h.tagName){l.removeChild(h);h=null}if(!h){h=f.createElementNS(c,e.element);if(l)(J||l).appendChild(h)}e.curStyles&&svgedit.utilities.assignAttributes(h,{fill:M.fill,stroke:M.stroke,"stroke-width":M.stroke_width,"stroke-dasharray":M.stroke_dasharray,"stroke-linejoin":M.stroke_linejoin, +{fill:"#000000",stroke_width:0,font_size:24,font_family:"Helvetica, Arial, sans-serif"});var M=U.shape,I=Array(1),S=this.addSvgElementFromJson=function(e){var h=svgedit.utilities.getElem(e.attr.id),l=B().getCurrentLayer();if(h&&e.element!=h.tagName){l.removeChild(h);h=null}if(!h){h=f.createElementNS(c,e.element);if(l)(J||l).appendChild(h)}e.curStyles&&svgedit.utilities.assignAttributes(h,{fill:M.fill,stroke:M.stroke,"stroke-width":M.stroke_width,"stroke-dasharray":M.stroke_dasharray,"stroke-linejoin":M.stroke_linejoin, "stroke-linecap":M.stroke_linecap,"stroke-opacity":M.stroke_opacity,"fill-opacity":M.fill_opacity,opacity:M.opacity/2,style:"pointer-events:inherit"},100);svgedit.utilities.assignAttributes(h,e.attr,100);svgedit.utilities.cleanupElement(h);return h},Y=b.getTransformList=svgedit.transformlist.getTransformList,P=svgedit.math.transformPoint,ia=b.matrixMultiply=svgedit.math.matrixMultiply,qa=b.hasMatrixTransform=svgedit.math.hasMatrixTransform,ga=b.transformListToTransform=svgedit.math.transformListToTransform, ba=svgedit.math.snapToAngle,W=svgedit.math.getMatrix;svgedit.units.init({getBaseUnit:function(){return m.baseUnit},getElement:svgedit.utilities.getElem,getHeight:function(){return k.getAttribute("height")/o},getWidth:function(){return k.getAttribute("width")/o},getRoundDigits:function(){return hb.round_digits}});var ta=b.convertToNum=svgedit.units.convertToNum;svgedit.utilities.init({getDOMDocument:function(){return f},getDOMContainer:function(){return a},getSVGRoot:function(){return d},getSelectedElements:function(){return I}, getSVGContent:function(){return k}});var ka=b.getUrlFromAttr=svgedit.utilities.getUrlFromAttr,da=b.getHref=svgedit.utilities.getHref,X=b.setHref=svgedit.utilities.setHref,Z=svgedit.utilities.getPathBBox;b.getBBox=svgedit.utilities.getBBox;var oa=b.getRotationAngle=svgedit.utilities.getRotationAngle,ra=b.getElem=svgedit.utilities.getElem,ma=b.assignAttributes=svgedit.utilities.assignAttributes,na=this.cleanupElement=svgedit.utilities.cleanupElement,Ca=svgedit.sanitize.getNSMap(),Ga=b.sanitizeSvg=svgedit.sanitize.sanitizeSvg, @@ -374,8 +374,8 @@ var E=l[D];u[D]=0;F[D]=0;switch(e){case "l":u[D]=z-E.x;break;case "c":u[D]=(z+v) z.setAttribute("fill",e);if(h){if(!v){v=f.createElementNS(c,"image");ma(v,{id:"background_image",width:"100%",height:"100%",preserveAspectRatio:"xMinYMin",style:"pointer-events:none"})}X(v,h);l.appendChild(v)}else v&&v.parentNode.removeChild(v)};this.cycleElement=function(e){var h=I[0],l=false,z=vb(J||B().getCurrentLayer());if(z.length){if(h==null){e=e?z.length-1:0;l=z[e]}else for(var v=z.length;v--;)if(z[v]==h){e=e?v-1:v+1;if(e>=z.length)e=0;else if(e<0)e=z.length-1;l=z[e];break}Bb([l],true);O("selected", I)}};this.clear();this.getPrivateMethods=function(){return{addCommandToHistory:za,setGradient:Rb,addSvgElementFromJson:S,assignAttributes:ma,BatchCommand:Ba,call:O,ChangeElementCommand:Oa,copyElem:la,ffClone:ea,findDefs:mb,findDuplicateGradient:Qb,getElem:ra,getId:ca,getIntersectionList:ub,getMouseTarget:Kb,getNextId:ja,getPathBBox:Z,getUrlFromAttr:ka,hasMatrixTransform:qa,identifyLayers:Gb,InsertElementCommand:Da,isIdentity:svgedit.math.isIdentity,logMatrix:Xa,matrixMultiply:ia,MoveElementCommand:Ja, preventClickDefault:qb,recalculateAllSelectedDimensions:Ha,recalculateDimensions:Wa,remapElement:fb,RemoveElementCommand:La,removeUnusedDefElems:Mb,round:gb,runExtensions:pb,sanitizeSvg:Ga,SVGEditTransformList:svgedit.transformlist.SVGTransformList,toString:toString,transformBox:svgedit.math.transformBox,transformListToTransform:ga,transformPoint:P,walkTree:svgedit.utilities.walkTree}}};(function(){document.addEventListener("touchstart",touchHandler,true);document.addEventListener("touchmove",touchHandler,true);document.addEventListener("touchend",touchHandler,true);document.addEventListener("touchcancel",touchHandler,true);if(!window.svgEditor)window.svgEditor=function(a){function p(d,k){var q=g.setSvgString(d)!==false;k=k||a.noop;q?k(true):a.alert(uiStrings.notification.errorLoadingSVG,function(){k(false)})}var g,c={},m=false;curConfig={canvas_expansion:1,dimensions:[580,400], -initFill:{color:"fff",opacity:1},initStroke:{width:1.5,color:"000",opacity:1},initOpacity:1,imgPath:"images/",extPath:"extensions/",jGraduatePath:"jgraduate/images/",extensions:[],initTool:"select",wireframe:false,colorPickerCSS:false,gridSnapping:false,gridColor:"#000",baseUnit:"px",snappingStep:10,showRulers:svgedit.browser.isTouch()?false:true,show_outside_canvas:false,no_save_warning:true,initFont:"Sans-serif"};uiStrings=c.uiStrings={common:{ok:"OK",cancel:"Cancel",key_up:"Up",key_down:"Down", -key_backspace:"Backspace",key_del:"Del"},layers:{layer:"Layer"},notification:{invalidAttrValGiven:"Invalid value given",noContentToFitTo:"No content to fit to",dupeLayerName:"There is already a layer named that!",enterUniqueLayerName:"Please enter a unique layer name",enterNewLayerName:"Please enter the new layer name",layerHasThatName:"Layer already has that name",QmoveElemsToLayer:'Move selected elements to layer "%s"?',QwantToClear:"Do you want to clear the drawing?\nThis will also erase your undo history!", +initFill:{color:"fff",opacity:1},initStroke:{width:1.5,color:"000",opacity:1},initOpacity:1,imgPath:"images/",extPath:"extensions/",jGraduatePath:"jgraduate/images/",extensions:[],initTool:"select",wireframe:false,colorPickerCSS:false,gridSnapping:false,gridColor:"#000",baseUnit:"px",snappingStep:10,showRulers:svgedit.browser.isTouch()?false:true,show_outside_canvas:false,no_save_warning:true,initFont:"Helvetica, Arial, sans-serif"};uiStrings=c.uiStrings={common:{ok:"OK",cancel:"Cancel",key_up:"Up", +key_down:"Down",key_backspace:"Backspace",key_del:"Del"},layers:{layer:"Layer"},notification:{invalidAttrValGiven:"Invalid value given",noContentToFitTo:"No content to fit to",dupeLayerName:"There is already a layer named that!",enterUniqueLayerName:"Please enter a unique layer name",enterNewLayerName:"Please enter the new layer name",layerHasThatName:"Layer already has that name",QmoveElemsToLayer:'Move selected elements to layer "%s"?',QwantToClear:"Do you want to clear the drawing?\nThis will also erase your undo history!", QwantToOpen:"Do you want to open a new file?\nThis will also erase your undo history!",QerrorsRevertToSource:"There were parsing errors in your SVG source.\nRevert back to original SVG source?",QignoreSourceChanges:"Ignore changes made to SVG source?",featNotSupported:"Feature not supported",enterNewImgURL:"Enter the new image URL",defsFailOnSave:"NOTE: Due to a bug in your browser, this image may appear wrong (missing gradients or elements). It will however appear correct once actually saved.",loadingImage:"Loading image, please wait...", saveFromBrowser:'Select "Save As..." in your browser to save this image as a %s file.',noteTheseIssues:"Also note the following issues: ",unsavedChanges:"There are unsaved changes.",enterNewLinkURL:"Enter the new hyperlink URL",errorLoadingSVG:"Error: Unable to load SVG data",URLloadFail:"Unable to load from URL",retrieving:'Retrieving "%s" ...'}};var s={},b={};c.curConfig=curConfig;c.tool_scale=1;c.setConfig=function(d){a.each(d,function(k,q){k in defaultPrefs&&a.pref(k,q)});a.extend(true,curConfig, d);if(d.extensions)curConfig.extensions=d.extensions};c.setCustomHandlers=function(d){c.ready(function(){if(d.open){a('#tool_open > input[type="file"]').remove();a("#tool_open").show();g.open=d.open}if(d.save){c.show_save_warning=false;g.bind("saved",d.save)}d.pngsave&&g.bind("exported",d.pngsave);b=d})};c.randomizeIds=function(){g.randomizeIds(arguments)};c.init=function(){function d(n,w){var C=n.id,K=C.split("_"),R=K[0];K=K[1];w&&g.setStrokeAttr("stroke-"+R,K);rb();db("#cur_"+R,C,20);a(n).addClass("current").siblings().removeClass("current")} @@ -438,14 +438,14 @@ Q.originalEvent.touches.length>=2){K=true;n=Q.clientX;w=Q.clientY;return false}} zoom}zoom&&xa({value:zoom})}});a(".menu_title").on("mousedown",function(){a("#tools_shapelib").hide();a("#menu_bar").toggleClass("active");jb.removeClass("open");a(this).parent().addClass("open")}).on("mouseover",function(){jb.removeClass("open");a(this).parent().addClass("open")});c.addDropDown=function(n,w,C){if(a(n).length!=0){var K=a(n).find("button"),R=a(n).find("ul").attr("id",a(n)[0].id+"-list");C||a("#option_lists").append(R);var Q=false;C&&a(n).addClass("dropup");R.find("li").bind("mouseup", w);a(window).mouseup(function(){if(!Q){K.removeClass("down");R.hide()}Q=false});K.bind("mousedown",function(){if(K.hasClass("down")){K.removeClass("down");R.hide()}else{K.addClass("down");if(!C){var V=a(n).offset();R.css({top:V.top,left:V.left-110})}R.show();Q=true}}).hover(function(){Q=true}).mouseout(function(){Q=false})}};var Ea=function(n,w,C,K){var R=a(n);w=a(w);var Q=false,V=K.dropUp;V&&a(n).addClass("dropup");w.find("li").bind("mouseup",function(){if(K.seticon){db("#cur_"+R[0].id,a(this).children()); a(this).addClass("current").siblings().removeClass("current")}C.apply(this,arguments)});a(window).mouseup(function(){if(!Q){R.removeClass("down");w.hide();w.css({top:0,left:0})}Q=false});w.height();a(n).bind("mousedown",function(){var aa=a(n).offset();if(V){aa.top-=w.height();aa.left+=8}else aa.top+=a(n).height();a(w).offset(aa);if(R.hasClass("down")){R.removeClass("down");w.hide();w.css({top:0,left:0})}else{R.addClass("down");w.show();Q=true;return false}}).hover(function(){Q=true}).mouseout(function(){Q= -false});K.multiclick&&w.mousedown(function(){Q=true})};c.addDropDown("#font_family_dropdown",function(){a(this).text();a("#font_family").val(a(this).text()).change()});a("div","#position_opts").each(function(){this.addEventListener("mouseup",function(){var n=this.id.replace("tool_pos","").charAt(0);g.alignSelectedElements(n,"page")})});(function(){var n,w=function(){a(n).blur()};a("#svg_editor").find("button, select, input:not(#text)").focus(function(){n=this;qa="toolbars";S.mousedown(w)}).blur(function(){qa= -"canvas";S.unbind("mousedown",w);g.getMode()=="textedit"&&a("#text").focus()})})();var wa=function(){$a("#tool_select")&&g.setMode("select")},hb=function(){$a("#tool_fhpath")&&g.setMode("fhpath")},Ma=function(){$a("#tool_line")&&g.setMode("line")},Ta=function(){$a("#tool_rect")&&g.setMode("rect")},Fa=function(){$a("#tool_ellipse")&&g.setMode("ellipse")},lb=function(){$a("#tool_image")&&g.setMode("image")},tb=function(){$a("#tool_zoom")&&g.setMode("zoom")},Ya=function(){if($a("#tool_zoom")){Fb();ba()}}, -bb=function(){$a("#tool_text")&&g.setMode("text")},Cb=function(){$a("#tool_path")&&g.setMode("path")},ua=function(){if(W!=null||ta)g.deleteSelectedElements()},nb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.cutSelectedElements()}},kb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.copySelectedElements()}},zb=function(){window.event.type==="keydown"&&qb(a("#edit_menu"));var n=g.getZoom(),w=(S[0].scrollLeft+S.width()/2)/n-g.contentW; -n=(S[0].scrollTop+S.height()/2)/n-g.contentH;g.pasteElements("point",w,n)},pb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToTopSelectedElement()}},gb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToBottomSelectedElement()}},ub=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected("Up")}},vb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected("Down")}}, -xb=function(n){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected(n)}},Ab=function(){if(W!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");J.toEditMode(elems[0]);g.clearSelection()}},la=function(){W!=null&&J.reorient()},ca=function(){if(W!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://",function(n){n&&g.makeHyperlink(n)})},ja=function(n, -w){if(W!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;n*=C;w*=C}a("input").blur();g.moveSelectedElements(n,w)}},O=function(){var n=!a("#tool_node_link").hasClass("checked");n?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);J.linkControlPoints(n)},T=function(){J.getNodePoint()&&J.clonePathNode()},ea=function(){J.getNodePoint()&&J.deletePathNode()},Ha=function(){var n= -a("#tool_add_subpath"),w=!n.hasClass("push_button_pressed");w?n.addClass("push_button_pressed").removeClass("tool_button"):n.removeClass("push_button_pressed").addClass("tool_button");J.addSubPath(w)},Pa=function(){J.opencloseSubPath()},Xa=function(){g.cycleElement(1)},fb=function(){g.cycleElement(0)},ob=function(n,w){if(!(W==null||ta)){n||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);Ba()}},Wa=function(){var n=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear,function(w){if(w){ba(); -g.clear();g.setResolution(n[0],n[1]);H(true);Fb();Ba();Z();g.runExtensions("onNewDocument")}})},sb=function(){g.setBold(!g.getBold());Ba();return false},Qa=function(){g.setItalic(!g.getItalic());Ba();return false},wb=function(){if(!b.pngsave){var n=uiStrings.notification.loadingImage;P=window.open("data:text/html;charset=utf-8,"+n+"

"+n+"

")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})}, +false});K.multiclick&&w.mousedown(function(){Q=true})};a("#font_family_dropdown").change(function(){var n=this.options[this.selectedIndex].value,w=this.options[this.selectedIndex].text;a("#preview_font").html(w).css("font-family",n);a("#font_family").val(n).change()});a("div","#position_opts").each(function(){this.addEventListener("mouseup",function(){var n=this.id.replace("tool_pos","").charAt(0);g.alignSelectedElements(n,"page")})});(function(){var n,w=function(){a(n).blur()};a("#svg_editor").find("button, select, input:not(#text)").focus(function(){n= +this;qa="toolbars";S.mousedown(w)}).blur(function(){qa="canvas";S.unbind("mousedown",w);g.getMode()=="textedit"&&a("#text").focus()})})();var wa=function(){$a("#tool_select")&&g.setMode("select")},hb=function(){$a("#tool_fhpath")&&g.setMode("fhpath")},Ma=function(){$a("#tool_line")&&g.setMode("line")},Ta=function(){$a("#tool_rect")&&g.setMode("rect")},Fa=function(){$a("#tool_ellipse")&&g.setMode("ellipse")},lb=function(){$a("#tool_image")&&g.setMode("image")},tb=function(){$a("#tool_zoom")&&g.setMode("zoom")}, +Ya=function(){if($a("#tool_zoom")){Fb();ba()}},bb=function(){$a("#tool_text")&&g.setMode("text")},Cb=function(){$a("#tool_path")&&g.setMode("path")},ua=function(){if(W!=null||ta)g.deleteSelectedElements()},nb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.cutSelectedElements()}},kb=function(){if(W!=null||ta){window.event.type==="keydown"&&qb(a("#edit_menu"));g.copySelectedElements()}},zb=function(){window.event.type==="keydown"&&qb(a("#edit_menu"));var n=g.getZoom(), +w=(S[0].scrollLeft+S.width()/2)/n-g.contentW;n=(S[0].scrollTop+S.height()/2)/n-g.contentH;g.pasteElements("point",w,n)},pb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToTopSelectedElement()}},gb=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveToBottomSelectedElement()}},ub=function(){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected("Up")}},vb=function(){if(W!=null){window.event.type==="keydown"&& +qb(a("#object_menu"));g.moveUpDownSelected("Down")}},xb=function(n){if(W!=null){window.event.type==="keydown"&&qb(a("#object_menu"));g.moveUpDownSelected(n)}},Ab=function(){if(W!=null){g.convertToPath();elems=g.getSelectedElems();g.selectorManager.requestSelector(elems[0]).selectorRect.setAttribute("display","none");g.setMode("pathedit");J.toEditMode(elems[0]);g.clearSelection()}},la=function(){W!=null&&J.reorient()},ca=function(){if(W!=null||ta)a.prompt(uiStrings.notification.enterNewLinkURL,"http://", +function(n){n&&g.makeHyperlink(n)})},ja=function(n,w){if(W!=null||ta){if(curConfig.gridSnapping){var C=g.getZoom()*curConfig.snappingStep;n*=C;w*=C}a("input").blur();g.moveSelectedElements(n,w)}},O=function(){var n=!a("#tool_node_link").hasClass("checked");n?a("#tool_node_link").addClass("checked").find("input").attr("checked",true):a("#tool_node_link").removeClass("checked").find("input").attr("checked",false);J.linkControlPoints(n)},T=function(){J.getNodePoint()&&J.clonePathNode()},ea=function(){J.getNodePoint()&& +J.deletePathNode()},Ha=function(){var n=a("#tool_add_subpath"),w=!n.hasClass("push_button_pressed");w?n.addClass("push_button_pressed").removeClass("tool_button"):n.removeClass("push_button_pressed").addClass("tool_button");J.addSubPath(w)},Pa=function(){J.opencloseSubPath()},Xa=function(){g.cycleElement(1)},fb=function(){g.cycleElement(0)},ob=function(n,w){if(!(W==null||ta)){n||(w*=-1);var C=a("#angle").val()*1+w;g.setRotationAngle(C);Ba()}},Wa=function(){var n=curConfig.dimensions;a.confirm(uiStrings.notification.QwantToClear, +function(w){if(w){ba();g.clear();g.setResolution(n[0],n[1]);H(true);Fb();Ba();Z();g.runExtensions("onNewDocument")}})},sb=function(){g.setBold(!g.getBold());Ba();return false},Qa=function(){g.setItalic(!g.getItalic());Ba();return false},wb=function(){if(!b.pngsave){var n=uiStrings.notification.loadingImage;P=window.open("data:text/html;charset=utf-8,"+n+"

"+n+"

")}window.canvg?g.rasterExport():a.getScript("canvg/rgbcolor.js",function(){a.getScript("canvg/canvg.js",function(){g.rasterExport()})})}, Bb=function(){g.open()},Kb=function(){},qb=function(n){var w=n.prev();w.css("background","#09f");setTimeout(function(){w.css("background","")},200)},ib=function(){if(U.getUndoStackSize()>0){window.event.type==="keydown"&&qb(a("#edit_menu"));U.undo()}},Ka=function(){if(U.getRedoStackSize()>0){window.event.type==="keydown"&&qb(a("#edit_menu"));U.redo()}},Mb=function(){if(ta)g.groupSelectedElements();else W&&g.ungroupSelectedElement()},Ob=function(){window.event.type==="keydown"&&qb(a("#edit_menu")); g.cloneSelectedElements(20,20)},Nb=function(){var n=this.id.replace("tool_align","").charAt(0);g.alignSelectedElements(n,a("#align_relative_to").val())},Pb=function(){var n=document.querySelector("#tool_stroke rect"),w=document.querySelector("#tool_fill rect"),C=w.getAttribute("fill"),K=n.getAttribute("fill");n=parseFloat(n.getAttribute("stroke-opacity"));if(isNaN(n))n=100;w=parseFloat(w.getAttribute("fill-opacity"));if(isNaN(w))w=100;K=Ja(K,n,"stroke");C=Ja(C,w,"fill");c.paintBox.fill.setPaint(K, true);c.paintBox.stroke.setPaint(C,true)},Fb=function(n){var w=g.getResolution();n=n?w.zoom*n:1;a("#zoom").val(n*100);g.setZoom(n);mb();H(true)},Gb=function(){!a("#tool_wireframe").hasClass("push_button_pressed")?a("#tool_wireframe").addClass("push_button_pressed"):a("#tool_wireframe").removeClass("push_button_pressed");S.toggleClass("wireframe");if(!A){var n=a("#wireframe_rules");n.length?n.empty():a('').appendTo("head");mb()}},Lb=function(){var n=!a("#tool_snap").hasClass("push_button_pressed"); diff --git a/method-draw/temp.css b/method-draw/temp.css index 760d875..4e5d831 100644 --- a/method-draw/temp.css +++ b/method-draw/temp.css @@ -1623,17 +1623,20 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), } #tool_bold, #tool_italic { - font: bold 2.1em/1.1em serif; + font: bold 40px/85px serif; text-align: center; - padding: 0 2px 5px 2px; position: relative; float:left; - margin: 5px 10px 0 0; + padding: 0 0 0 0; color: #ccc; - background: #2f2f2c; - border: solid #3f3f3c 1px; + background: transparent; + border: none; + width: 100%; + height: 70px; + margin: 0; } + #tool_bold:hover, #tool_italic:hover { color: #fff; } @@ -2462,6 +2465,32 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), cursor: -moz-drag; } +.draginput.twocol { + width: 145px; +} + +#tool_font_family .caret { + right: 10px; + top: 55%; +} + +#preview_font { + font-size: 24px; + color: #fff; + margin: 30px 0 0 10px; +} + +#preview_font:after { + content: ''; + position: absolute; + right: 0; + top: 3px; + bottom: 3px; + width: 40px; + border-right: solid #3f3f3c 10px; + background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzU4MCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj48c3RvcCBzdG9wLWNvbG9yPSIjM2YzZjNjIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMzZjNmM2MiIG9mZnNldD0iMC43Ii8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c1ODApIiAvPjwvc3ZnPg==); +} + .draginput input:active { cursor: url(images/dragging.png), move; cursor: -webkit-dragging; @@ -2499,6 +2528,8 @@ box-shadow: inset 0 3px 10px rgba(255, 255, 255, 0.1), width: 100%; margin: 0; z-index: 1; + top: 0; + left: 0; }