Move getLayer() into Drawing with tests

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1928 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2011-01-17 05:02:08 +00:00
parent 8691a37376
commit 97071abd0e
5 changed files with 108 additions and 73 deletions

View File

@@ -3696,7 +3696,7 @@
// if no layer is passed in, this function restores the other layers
var toggleHighlightLayer = function(layerNameToHighlight) {
var curNames = new Array(svgCanvas.getCurrentDrawing().getNumLayers());
for (var i = 0; i < curNames.length; ++i) { curNames[i] = svgCanvas.getLayer(i); }
for (var i = 0; i < curNames.length; ++i) { curNames[i] = svgCanvas.getCurrentDrawing().getLayer(i); }
if (layerNameToHighlight) {
for (var i = 0; i < curNames.length; ++i) {
@@ -3722,7 +3722,7 @@
var icon = $.getSvgIcon('eye');
// we get the layers in the reverse z-order (the layer rendered on top is listed first)
while (layer--) {
var name = svgCanvas.getLayer(layer);
var name = svgCanvas.getCurrentDrawing().getLayer(layer);
// contenteditable=\"true\"
var appendstr = "<tr class=\"layer";
if (name == currentlayer) {