Fix Issue 28: Use spinners instead of pulldowns for stroke-width and rect radius. Add spinbtn jquery plugin
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@278 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -193,9 +193,9 @@ function svg_edit_setup() {
|
||||
pos = $('#tools_ellipse_show').position();
|
||||
$('#tools_ellipse').css({'left': pos.left+4, 'top': pos.top+70});
|
||||
|
||||
$('#stroke_width').change(function(){
|
||||
svgCanvas.setStrokeWidth(this.options[this.selectedIndex].value);
|
||||
});
|
||||
function changeStrokeWidth(ctl) {
|
||||
svgCanvas.setStrokeWidth(ctl.value);
|
||||
}
|
||||
|
||||
$('#stroke_style').change(function(){
|
||||
svgCanvas.setStrokeStyle(this.options[this.selectedIndex].value);
|
||||
@@ -217,10 +217,10 @@ function svg_edit_setup() {
|
||||
svgCanvas.setTextContent(this.value);
|
||||
});
|
||||
|
||||
$('#rect_radius').change(function(){
|
||||
svgCanvas.setRectRadius(this.options[this.selectedIndex].value);
|
||||
});
|
||||
|
||||
function changeRectRadius(ctl) {
|
||||
svgCanvas.setRectRadius(ctl.value);
|
||||
}
|
||||
|
||||
$('.attr_changer').change(function() {
|
||||
svgCanvas.changeSelectedAttribute(this.getAttribute("alt"), this.value);
|
||||
});
|
||||
@@ -618,5 +618,8 @@ function svg_edit_setup() {
|
||||
svgCanvas.setResolution(x,y);
|
||||
});
|
||||
|
||||
$('#rect_radius').SpinButton({ min: 0, max: 1000, step: 1, callback: changeRectRadius });
|
||||
$('#stroke_width').SpinButton({ min: 1, max: 99, step: 1, callback: changeStrokeWidth });
|
||||
|
||||
return svgCanvas;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user