Rollback bad revision 2075
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2076 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
b0aa96bdec
commit
7e6a6e68a1
|
@ -1,4 +1,4 @@
|
|||
body {
|
||||
body {
|
||||
background: #D0D0D0;
|
||||
}
|
||||
|
||||
|
@ -222,29 +222,19 @@ html, body, div{
|
|||
border-width: 1px;
|
||||
border-left: none;
|
||||
}
|
||||
#svg_editor #sidepanels #toolpalettes{
|
||||
|
||||
#svg_editor #layerpanel {
|
||||
display: inline-block;
|
||||
position:absolute;
|
||||
padding: 10px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left:0;
|
||||
overflow-y:auto;
|
||||
overflow-x:hidden;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#svg_editor #sidepanels .toolpalette{
|
||||
padding-left:10px;
|
||||
margin-right:10px;
|
||||
margin-bottom:10px;
|
||||
display:none;
|
||||
top: 1px;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
width: 0px;
|
||||
overflow: auto;
|
||||
margin: 0px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
border-top:2px solid gray;
|
||||
width:100%;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -55,48 +55,6 @@
|
|||
|
||||
<!-- Add script with custom handlers here -->
|
||||
<title>SVG-edit</title>
|
||||
<style>
|
||||
#samplepalette{
|
||||
overflow:hide;
|
||||
}
|
||||
#samplepalette ul{
|
||||
padding-left: 5px;
|
||||
}
|
||||
#samplepalette #palettecontents{
|
||||
height:700px;
|
||||
width:250px;
|
||||
overflow-y:auto;
|
||||
}
|
||||
#samplepalette li{
|
||||
list-style: none;
|
||||
padding-top: 10px;
|
||||
padding-left:5px;
|
||||
padding-bottom: 10px;
|
||||
font-size: 14px;
|
||||
border: 1px solid black;
|
||||
border-top: 0px;
|
||||
cursor:pointer;
|
||||
}
|
||||
#samplepalette li:hover {
|
||||
background-color: #FFFFC2;
|
||||
border-left:1px solid #FBD0AD;
|
||||
border-top:1px solid #FBD0AD;
|
||||
border-right:1px solid #D79861;
|
||||
border-bottom:1px solid #D79861;
|
||||
}
|
||||
#samplepalette li:first-child {
|
||||
border: 1px solid black;
|
||||
}
|
||||
#samplepalette li:first-child:hover {
|
||||
background-color: #FFFFC2;
|
||||
border-left:1px solid #FBD0AD;
|
||||
border-top:1px solid #FBD0AD;
|
||||
border-right:1px solid #D79861;
|
||||
border-bottom:1px solid #D79861;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="svg_editor">
|
||||
|
@ -123,8 +81,7 @@
|
|||
</div>
|
||||
|
||||
<div id="sidepanels">
|
||||
<div id="toolpalettes">
|
||||
<div id="layerpanel" class="toolpalette">
|
||||
<div id="layerpanel">
|
||||
<h3 id="layersLabel">Layers</h3>
|
||||
<fieldset id="layerbuttons">
|
||||
<div id="layer_new" class="layer_button" title="New Layer"></div>
|
||||
|
@ -146,41 +103,7 @@
|
|||
<option selected="selected" value="layer1">Layer 1</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="samplepalette" class="toolpalette">
|
||||
<h3 id="samplepalettelabel">Sample Palette</h3>
|
||||
<div id="palettecontents">
|
||||
<ul>
|
||||
<li>Alligator</li>
|
||||
<li>Bear</li>
|
||||
<li>Catfish</li>
|
||||
<li>Donkey</li>
|
||||
<li>Eagle</li>
|
||||
<li>Firemouth</li>
|
||||
<li>Gecko</li>
|
||||
<li>Hippopotomus</li>
|
||||
<li>Ibex</li>
|
||||
<li>Jaguar</li>
|
||||
<li>Komodo Dragon</li>
|
||||
<li>Lobster</li>
|
||||
<li>Mouse</li>
|
||||
<li>Narwhal</li>
|
||||
<li>Octopus</li>
|
||||
<li>Possum</li>
|
||||
<li>Quail</li>
|
||||
<li>Rhinoceros</li>
|
||||
<li>Snake</li>
|
||||
<li>Turtle</li>
|
||||
<li>Unicorn</li>
|
||||
<li>Velociraptor</li>
|
||||
<li>Warthog</li>
|
||||
<li>Xeme</li>
|
||||
<li>Yak</li>
|
||||
<li>Zebra</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidepanel_handle" title="Drag left/right to resize side panel [X]">P a l e t t e s</div>
|
||||
<div id="sidepanel_handle" title="Drag left/right to resize side panel [X]">L a y e r s</div>
|
||||
</div>
|
||||
|
||||
<div id="main_button">
|
||||
|
|
|
@ -3744,7 +3744,7 @@
|
|||
});
|
||||
|
||||
var SIDEPANEL_MAXWIDTH = 300;
|
||||
var SIDEPANEL_OPENWIDTH = 300;
|
||||
var SIDEPANEL_OPENWIDTH = 150;
|
||||
var sidedrag = -1, sidedragging = false, allowmove = false;
|
||||
|
||||
var resizePanel = function(evt) {
|
||||
|
@ -3801,15 +3801,13 @@
|
|||
// the optional close argument forces the side panel closed
|
||||
var toggleSidePanel = function(close){
|
||||
var w = parseInt($('#sidepanels').css('width'));
|
||||
var alreadyOpen = w > 2;
|
||||
var deltax = (alreadyOpen || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
||||
var deltax = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
||||
var sidepanels = $('#sidepanels');
|
||||
var palettes = $('.toolpalette');
|
||||
var layerpanel = $('#layerpanel');
|
||||
var ruler_x = $('#ruler_x');
|
||||
workarea.css('right', parseInt(workarea.css('right')) + deltax);
|
||||
sidepanels.css('width', parseInt(sidepanels.css('width')) + deltax);
|
||||
palettes.css('display', alreadyOpen ? 'none':'inherit');
|
||||
$('#toolpalettes').css('display', alreadyOpen ? 'none':'inherit');
|
||||
layerpanel.css('width', parseInt(layerpanel.css('width')) + deltax);
|
||||
ruler_x.css('right', parseInt(ruler_x.css('right')) + deltax);
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
var svgroot = document.getElementById('svgroot');
|
||||
var svgcontent, rect, circle;
|
||||
|
||||
var NEAR_ZERO = 5e-6; // 0.000005, Firefox fails at higher levels of precision.
|
||||
var NEAR_ZERO = 1e-7;
|
||||
function almostEquals(a, b, msg) {
|
||||
msg = msg || (a + ' did not equal ' + b);
|
||||
ok(Math.abs(a - b) < NEAR_ZERO, msg);
|
||||
|
|
Loading…
Reference in New Issue