Fix Issue 77: Declare charset

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@335 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-07-20 13:56:01 +00:00
parent 35cb72ea4e
commit f8fd9a7be8
3 changed files with 42 additions and 23 deletions

View File

@ -205,34 +205,32 @@ div.color_block {
position: absolute; position: absolute;
display: none; display: none;
cursor: pointer; cursor: pointer;
float: left;
width: 300px;
} }
#svg_editor #tool_square { #svg_editor .tools_flyout_v {
background: 2px 2px url('images/square.png') no-repeat; position: absolute;
display: none;
cursor: pointer;
width: 30px;
} }
#svg_editor #tool_rect { #svg_editor #tool_square { background: 2px 2px url('images/square.png') no-repeat; }
background: 2px 2px url('images/rect.png') no-repeat; #svg_editor #tool_rect { background: 2px 2px url('images/rect.png') no-repeat; }
} #svg_editor #tool_fhrect { background: 2px 2px url('images/freehand-square.png') no-repeat; }
#svg_editor #tool_circle { background: 2px 2px url('images/circle.png') no-repeat; }
#svg_editor #tool_fhrect { #svg_editor #tool_ellipse { background: 2px 2px url('images/ellipse.png') no-repeat; }
background: 2px 2px url('images/freehand-square.png') no-repeat; #svg_editor #tool_fhellipse { background: 2px 2px url('images/freehand-circle.png') no-repeat; }
} #svg_editor #tool_stacktop { background: 2px 2px url('images/move_top.png') no-repeat; }
#svg_editor #tool_stackbottom { background: 2px 2px url('images/move_bottom.png') no-repeat; }
#svg_editor #tool_circle { #svg_editor #tool_aligntop { background: 2px 2px url('images/align-vertical-top.png') no-repeat; }
background: 2px 2px url('images/circle.png') no-repeat; #svg_editor #tool_alignmiddle { background: 2px 2px url('images/align-vertical-middle.png') no-repeat; }
} #svg_editor #tool_alignbottom { background: 2px 2px url('images/align-vertical-bottom.png') no-repeat; }
#svg_editor #tool_alignleft { background: 2px 2px url('images/align-horizontal-left.png') no-repeat; }
#svg_editor #tool_ellipse { #svg_editor #tool_aligncenter { background: 2px 2px url('images/align-horizontal-center.png') no-repeat; }
background: 2px 2px url('images/ellipse.png') no-repeat; #svg_editor #tool_alignright { background: 2px 2px url('images/align-horizontal-right.png') no-repeat; }
}
#svg_editor #tool_fhellipse {
background: 2px 2px url('images/freehand-circle.png') no-repeat;
}
/* TODO: figure out what more-specific selector causes me to write this atrocity and not
simply .tool_flyout_button */
#svg_editor #tools_rect .tool_flyout_button, #svg_editor #tools_ellipse .tool_flyout_button { #svg_editor #tools_rect .tool_flyout_button, #svg_editor #tools_ellipse .tool_flyout_button {
float: left; float: left;
background-color: #E8E8E8; background-color: #E8E8E8;

View File

@ -1,6 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="jpicker/jpicker.css" type="text/css"/> <link rel="stylesheet" href="jpicker/jpicker.css" type="text/css"/>
<link rel="stylesheet" href="svg-editor.css" type="text/css"/> <link rel="stylesheet" href="svg-editor.css" type="text/css"/>
<link rel="stylesheet" href="spinbtn/JQuerySpinBtn.css" type="text/css"/> <link rel="stylesheet" href="spinbtn/JQuerySpinBtn.css" type="text/css"/>
@ -223,6 +224,20 @@
<div id="tool_fhellipse" class="tool_flyout_button" title="Free-Hand Ellipse"></div> <div id="tool_fhellipse" class="tool_flyout_button" title="Free-Hand Ellipse"></div>
</div> </div>
<div id="tools_stacking" class="tools_flyout_v">
<div id="tool_stacktop" class="tool_flyout_button" title="Move to Top [Shift+Up]"></div>
<div id="tool_stackbottom" class="tool_flyout_button" title="Move to Bottom [Shift+Down]"></div>
</div>
<div id="tools_align" class="tools_flyout_v">
<div id="tool_aligntop" class="tool_flyout_button" title="Align to Top"></div>
<div id="tool_alignbottom" class="tool_flyout_button" title="Align to Bottom"></div>
<div id="tool_alignmiddle" class="tool_flyout_button" title="Align to Middle"></div>
<div id="tool_alignleft" class="tool_flyout_button" title="Align to Left"></div>
<div id="tool_alignright" class="tool_flyout_button" title="Align to Right"></div>
<div id="tool_aligncenter" class="tool_flyout_button" title="Align to Center"></div>
</div>
</div> <!-- svg_editor --> </div> <!-- svg_editor -->
<div id="svg_source_editor"> <div id="svg_source_editor">

View File

@ -581,6 +581,7 @@ function svg_edit_setup() {
} }
var pos = elem.position(); var pos = elem.position();
picker = 'stroke'; picker = 'stroke';
console.log(color);
$('#color_picker').css({'left': pos.left - 140, 'bottom': 104 - pos.top}).jPicker({ $('#color_picker').css({'left': pos.left - 140, 'bottom': 104 - pos.top}).jPicker({
images: { clientPath: "jpicker/images/" }, images: { clientPath: "jpicker/images/" },
color: { active: color, alphaSupport: true } color: { active: color, alphaSupport: true }
@ -673,6 +674,11 @@ function svg_edit_setup() {
}); });
$('#tools_rect').mouseleave(function(){$('#tools_rect').fadeOut();}); $('#tools_rect').mouseleave(function(){$('#tools_rect').fadeOut();});
$('#tool_move_top').mousedown(function(evt){
$('#tools_stacking').show();
evt.preventDefault();
});
$('#tools_ellipse_show').mousedown(function(evt){ $('#tools_ellipse_show').mousedown(function(evt){
$('#tools_ellipse').show(); $('#tools_ellipse').show();
// this prevents the 'image drag' behavior in Firefox // this prevents the 'image drag' behavior in Firefox