Add comment about return undefined rather than null for unclear styles, and fix test.

This commit is contained in:
Jürg Lehni 2011-05-05 13:11:40 +01:00
parent 51b2cf287d
commit 478002ea1c
2 changed files with 3 additions and 2 deletions

View file

@ -85,6 +85,7 @@ var PathStyle = this.PathStyle = Base.extend(new function() {
} else if (style != childStyle) {
// If there is another item with a different style,
// the style is not defined:
// TODO: Port back to Sg (currently returns null)
return undefined;
}
}

View file

@ -111,8 +111,8 @@ test('setting group styles 2', function() {
compareRGBColors(secondPath.strokeColor, 'red', 'secondPath.strokeColor');
// By appending a path with a different fillcolor,
// the group's fillColor should return null:
equals(group.fillColor, null, 'group.fillColor');
// the group's fillColor should return undefined:
equals(group.fillColor, undefined, 'group.fillColor');
// But, both paths have a red strokeColor, so:
compareRGBColors(group.strokeColor, 'red', 'group.strokeColor');