()
| 385 | }); |
| 386 | |
| 387 | function showPathEdit(){ |
| 388 | $('#path_node_panel').show(); |
| 389 | $('#stroke_panel').hide(); |
| 390 | var point = svgCanvas.pathActions.getNodePoint(); |
| 391 | $('#tool_node_delete').toggleClass('disabled', !svgCanvas.pathActions.canDeleteNodes); |
| 392 | if(point) { |
| 393 | var seg_type = $('#seg_type'); |
| 394 | point.x = svgedit.units.convertUnit(point.x); |
| 395 | point.y = svgedit.units.convertUnit(point.y); |
| 396 | $('#path_node_x').val(Math.round(point.x)); |
| 397 | $('#path_node_y').val(Math.round(point.y)); |
| 398 | if(point.type) { |
| 399 | seg_type.val(point.type).removeAttr('disabled'); |
| 400 | $("#seg_type_label").html(point.type === 4 ? "Straight" : "Curve") |
| 401 | } else { |
| 402 | seg_type.val(4).attr('disabled','disabled'); |
| 403 | } |
| 404 | } |
| 405 | $("#panels").removeClass("multiselected") |
| 406 | $("#stroke_panel").hide(); |
| 407 | $("#canvas_panel").hide(); |
| 408 | return; |
| 409 | } |
| 410 | |
| 411 | this.show = show; |
| 412 | this.updateContextPanel = updateContextPanel; |
no test coverage detected