mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add comment about return undefined rather than null for unclear styles, and fix test.
This commit is contained in:
parent
51b2cf287d
commit
478002ea1c
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue