Converted linejoin options to icons

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1505 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-04-06 15:53:21 +00:00
parent 9b04d4689e
commit 6f50b1fdc4
4 changed files with 99 additions and 38 deletions

View File

@@ -314,6 +314,10 @@
'#linecap_round':'linecap_round',
'#linecap_square':'linecap_square',
'#linejoin_miter,#cur_linejoin':'linejoin_miter',
'#linejoin_round':'linejoin_round',
'#linejoin_bevel':'linejoin_bevel',
'#url_notice':'warning',
'#layer_up':'go_up',
@@ -1020,8 +1024,9 @@
$('#stroke_width').val(selectedElement.getAttribute("stroke-width")||1);
$('#stroke_style').val(selectedElement.getAttribute("stroke-dasharray")||"none");
$('#stroke_linejoin').val(selectedElement.getAttribute("stroke-linejoin")||"miter");
// $('#stroke_linecap').val(selectedElement.getAttribute("stroke-linecap")||"butt");
var attr = selectedElement.getAttribute("stroke-linejoin") || 'miter';
$('#linejoin_' + attr).mouseup();
var attr = selectedElement.getAttribute("stroke-linecap") || 'butt';
$('#linecap_' + attr).mouseup();
@@ -1689,6 +1694,15 @@
$.resizeSvgIcons({'#cur_linecap .svg_icon': 20});
}, true);
addAltDropDown('#stroke_linejoin', '#linejoin_opts', function() {
var val = this.id.split('_')[1];
svgCanvas.setStrokeAttr('stroke-linejoin', val);
operaRepaint();
var icon = $.getSvgIcon(this.id).clone();
$('#cur_linejoin').empty().append(icon);
$.resizeSvgIcons({'#cur_linejoin .svg_icon': 20});
}, true);
/*
When a flyout icon is selected