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-75d572ba1dddmaster
parent
aacc77b6a6
commit
5b3cefd7a7
|
@ -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!");
|
||||
|
|
Loading…
Reference in New Issue