When making a new layer, the prompt() has a default value of 'Layer [number of layers+1]', feel free to revert if you dont like it

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@753 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Kevin Kwok 2009-10-02 23:36:20 +00:00
parent aacc77b6a6
commit 5b3cefd7a7
1 changed files with 1 additions and 2 deletions

View File

@ -1098,8 +1098,7 @@ function svg_edit_setup() {
$('#layer_new').click(function() {
var curNames = new Array(svgCanvas.getNumLayers());
for (var i = 0; i < curNames.length; ++i) { curNames[i] = svgCanvas.getLayer(i); }
var newName = prompt("Please enter a unique layer name","");
var newName = prompt("Please enter a unique layer name","Layer "+(curNames.length+1));
if (!newName) return;
if (jQuery.inArray(newName, curNames) != -1) {
alert("There is already a layer named that!");