From 478002ea1c57092cfe949281d49d9e951fb7388b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 5 May 2011 13:11:40 +0100 Subject: [PATCH] Add comment about return undefined rather than null for unclear styles, and fix test. --- src/item/PathStyle.js | 1 + test/tests/PathStyle.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/item/PathStyle.js b/src/item/PathStyle.js index 07d93ecb..51867351 100644 --- a/src/item/PathStyle.js +++ b/src/item/PathStyle.js @@ -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; } } diff --git a/test/tests/PathStyle.js b/test/tests/PathStyle.js index d062737e..5b7ba8f9 100644 --- a/test/tests/PathStyle.js +++ b/test/tests/PathStyle.js @@ -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');