Jump to content

undermuz

Neophyte
  • Posts

    1
  • Joined

  • Last visited

undermuz's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. ... var l_s; ... function init_m(....){ ... r_right = getAttributes(s_tag)["r.right"]; //Ширина r_bottom = getAttributes(s_tag)["r.bottom"]; //Высота $("#cont").css('width', r_right*cscale+'px'); //Задание размеров $("#cont").css('height', r_bottom*cscale+'px'); //.. l_s = Raphael(document.getElementById("cont"), r_right, r_bottom); ... } function print_scheme(){//Отрисовка .. for(line_s in line_arry){ x1 = line_arry[line_s].x1; x2 = line_arry[line_s].x2; y1 = line_arry[line_s].y1; y2 = line_arry[line_s].y2; if((x1 != '' && x2 != '' && y1 != '' && y2 != '') && (x1 != null && x2 != null && y1 != null && y2 != null) && (x1 != 'NaN' && x2 != 'NaN' && y1 != 'NaN' && y2 != 'NaN')) line_arry[line_s] = l_s.path('M'+x1*cscale+' '+y1*cscale+'L'+x2*cscale+' '+y2*cscale).attr('fill','#999'); } .. } Ошибок нет, но почему-то не отрисовывает линии. но если сделать так: ... function print_scheme(){//Отрисовка .. var l_s = Raphael(document.getElementById("cont"), r_right, r_bottom); for(line_s in line_arry){ x1 = line_arry[line_s].x1; x2 = line_arry[line_s].x2; y1 = line_arry[line_s].y1; y2 = line_arry[line_s].y2; if((x1 != '' && x2 != '' && y1 != '' && y2 != '') && (x1 != null && x2 != null && y1 != null && y2 != null) && (x1 != 'NaN' && x2 != 'NaN' && y1 != 'NaN' && y2 != 'NaN')) line_arry[line_s] = l_s.path('M'+x1*cscale+' '+y1*cscale+'L'+x2*cscale+' '+y2*cscale).attr('fill','#999'); } .. } то все ресует, вот только доступа к элементам у меня потом нет...в чем проблема, подскажите..очень большой проэкт. нужно срочно...зарание спасибо
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy