mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -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) {
|
} else if (style != childStyle) {
|
||||||
// If there is another item with a different style,
|
// If there is another item with a different style,
|
||||||
// the style is not defined:
|
// the style is not defined:
|
||||||
|
// TODO: Port back to Sg (currently returns null)
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,8 +111,8 @@ test('setting group styles 2', function() {
|
||||||
compareRGBColors(secondPath.strokeColor, 'red', 'secondPath.strokeColor');
|
compareRGBColors(secondPath.strokeColor, 'red', 'secondPath.strokeColor');
|
||||||
|
|
||||||
// By appending a path with a different fillcolor,
|
// By appending a path with a different fillcolor,
|
||||||
// the group's fillColor should return null:
|
// the group's fillColor should return undefined:
|
||||||
equals(group.fillColor, null, 'group.fillColor');
|
equals(group.fillColor, undefined, 'group.fillColor');
|
||||||
|
|
||||||
// But, both paths have a red strokeColor, so:
|
// But, both paths have a red strokeColor, so:
|
||||||
compareRGBColors(group.strokeColor, 'red', 'group.strokeColor');
|
compareRGBColors(group.strokeColor, 'red', 'group.strokeColor');
|
||||||
|
|
Loading…
Reference in a new issue