Issue 73: Ensure first layer is always selected. Adjust layer buttons to fit Opera and Webkit.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@672 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
ef4d16ee05
commit
61fe5dc9fe
|
@ -88,7 +88,9 @@ body {
|
||||||
#svg_editor #layerbuttons {
|
#svg_editor #layerbuttons {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
width: 110px;
|
padding-left: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
width: 106px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border-right: 1px solid #FFFFFF;
|
border-right: 1px solid #FFFFFF;
|
||||||
border-bottom: 1px solid #FFFFFF;
|
border-bottom: 1px solid #FFFFFF;
|
||||||
|
@ -97,8 +99,8 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
#svg_editor .layer_button {
|
#svg_editor .layer_button {
|
||||||
width: 15px;
|
width: 14px;
|
||||||
height: 15px;
|
height: 14px;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
border-left: 1px solid #FFFFFF;
|
border-left: 1px solid #FFFFFF;
|
||||||
border-top: 1px solid #FFFFFF;
|
border-top: 1px solid #FFFFFF;
|
||||||
|
|
|
@ -79,9 +79,6 @@ function svg_edit_setup() {
|
||||||
// we tell it to skip focusing the text control if the
|
// we tell it to skip focusing the text control if the
|
||||||
// text element was previously in focus
|
// text element was previously in focus
|
||||||
updateContextPanel();
|
updateContextPanel();
|
||||||
|
|
||||||
// TODO: ensure that the current layer is selected
|
|
||||||
console.log(svgCanvas.getCurrentLayer());
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var zoomChanged = function(window, bbox) {
|
var zoomChanged = function(window, bbox) {
|
||||||
|
@ -1133,6 +1130,11 @@ function svg_edit_setup() {
|
||||||
var name = svgCanvas.getLayer(layer);
|
var name = svgCanvas.getLayer(layer);
|
||||||
$('#layerlist').append("<option value=\"" + name + "\">" + name + "</option>");
|
$('#layerlist').append("<option value=\"" + name + "\">" + name + "</option>");
|
||||||
}
|
}
|
||||||
|
// if we only have one layer, then always make sure that layer is selected
|
||||||
|
// (This is really only required upon first initialization)
|
||||||
|
if ($('#layerlist').size() == 1) {
|
||||||
|
$('#layerlist option:first').attr("selected", "selected");
|
||||||
|
}
|
||||||
$('#layerlist option').mouseup(function(evt){
|
$('#layerlist option').mouseup(function(evt){
|
||||||
$('#layerlist option').removeAttr("selected");
|
$('#layerlist option').removeAttr("selected");
|
||||||
var option = $(this);
|
var option = $(this);
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
Issue 73 (Layers) TODO:
|
Issue 73 (Layers) TODO:
|
||||||
|
|
||||||
- do pop-up window that asks for layer name and rename layer, ensure that is undo-able
|
- ensure that the current_layer is ALWAYS selected
|
||||||
- ensure that pointer-events work properly with layers named the same
|
|
||||||
- create API for SvgCanvas that allows the client to:
|
- create API for SvgCanvas that allows the client to:
|
||||||
- change layer order
|
- change layer order
|
||||||
- create a mouseover region on the sidepanels that is resizable and affects all children within
|
- create a mouseover region on the sidepanels that is resizable and affects all children within
|
||||||
|
|
Loading…
Reference in New Issue