Председатель BASHINVEST
Created by
BASHINVEST
function updatePath(opt) { var width = opt.width; var height = opt.height; var rx1 = opt.rx1; var rx2 = opt.rx2; var rx3 = opt.rx3; var rx4 = opt.rx4; var path = opt.path; const x = 0; const y = 0; const newD = ` M${x} ${y + rx1} a${rx1} ${rx1} 0 0 1 ${rx1} -${rx1} h${width - rx1 - rx2} a${rx2} ${rx2} 0 0 1 ${rx2} ${rx2} v${height - rx2 - rx3} a${rx3} ${rx3} 0 0 1 -${rx3} ${rx3} h-${width - rx3 - rx4} a${rx4} ${rx4} 0 0 1 -${rx4} -${rx4} v-${height - rx1 - rx4} z `; path.attr('d', newD); } var defRadius; var singleRadius = 1; var rx1 = 0,rx2 = 0,rx3 = 0,rx4 = 0; var def_rx1 = 0,def_rx2 = 0,def_rx3 = 0,def_rx4 = 0; var radius = setts.radius; var maxRadius = Math.min(widthF,heightF)/2; if(setts.type=='rounded_rectangle'){ defRadius = widthF*0.1; } else if(setts.type=='rect'){ defRadius = 0; } else if(setts.type=='arch_down'||setts.type=='arch_up'){ defRadius = widthF/2; } else if(setts.type=='pill'){ defRadius = heightF/2; } if(singleRadius){ var radius = (radius!=undefined?radius:defRadius); if(!resizableResize&&radius&&radius>maxRadius){ radius = maxRadius; } rx1 = radius; rx2 = radius; rx3 = radius; rx4 = radius; if(setts.type=='arch_down'){ rx1=0; rx2=0; } else if(setts.type=='arch_up'){ rx3=0; rx4=0; } if(widthF<(radius*2)){ widthF = radius*2; res['minWidth'] = widthF; } if(heightF<(radius*2)){ heightF = radius*2; res['minHeight'] = heightF; } } else { /* rx1 = (rx1!='none'?radius:0); rx2 = (radius?radius:def_rx2); rx3 = (radius?radius:def_rx3); rx4 = (radius?radius:def_rx4); if(!resizableResize&&(radius*2)>maxRadius){ radius = maxRadius; } if(widthF<(rx1+rx2)){ widthF = rx1+rx2; res['minWidth'] = widthF; } if(widthF<(rx3+rx4)){ widthF = rx3+rx4; res['minWidth'] = widthF; } if(heightF<(rx1+rx3)){ heightF = rx1+rx3; res['minHeight'] = heightF; } if(heightF<(rx2+rx3)){ heightF = rx2+rx3; res['minHeight'] = heightF; }*/ } path = svg.children('path'); updatePath({'path':path,'width':widthF,'height':heightF,'rx1':rx1,'rx2':rx2,'rx3':rx3,'rx4':rx4}); groupWrap.data('setts').radius = radius;
Узнать в Telegram
Узнать в Telegram
Политика конфиденциальности | Договор оферта
var mbtn = $("[data-eval=67749419916679883901]");window.addpcode67749419916679883901="";var allow_this_code = 1;/*jbins*/var mbtn_num = mbtn.next("noindex").find("[data-evalnum]");if(allow_this_code){ $( document ).off( "php"+"67749419916679883901");$( document ).on( "php"+"67749419916679883901", { crm: 0,clickedobj:0,}, function( event, arg_request, arg2 ) { if(arg_request.substring(0,6)=="error:"){alert(arg_request.replace("error:",""));php_ajax_call_reload=0;} else { $(document).trigger("alert_pop_close"); /*jains*/var hrefer = mbtn.attr("href");hrefer = (hrefer?hrefer:"");}mbtn.removeClass("dis");});mbtn.removeClass("dis");$( document ).trigger( "php"+"67749419916679883901", [ "", "" ] );} else {mbtn.removeClass("dis");}
Сообщение:
Nera