mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Switch back to instanceof checks.
As people are started to subclass Paper.js classes...
This commit is contained in:
parent
e238d23194
commit
44e913201d
2 changed files with 2 additions and 3 deletions
|
@ -1626,8 +1626,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
getStyle: function() {
|
||||
// If this path is part of a CompoundPath, use the paren't style instead
|
||||
var parent = this._parent;
|
||||
return (parent && parent._type === 'compound-path'
|
||||
? parent : this)._style;
|
||||
return (parent && parent instanceof CompoundPath ? parent : this)._style;
|
||||
},
|
||||
|
||||
// DOCS: toShape
|
||||
|
|
|
@ -175,7 +175,7 @@ var Style = Base.extend(new function() {
|
|||
// they all have the same style.
|
||||
// If true is passed for dontMerge, don't merge children styles
|
||||
if (!children || children.length === 0 || arguments[0]
|
||||
|| this._item._type === 'compound-path') {
|
||||
|| this._item instanceof CompoundPath) {
|
||||
var value = this._values[key];
|
||||
if (value === undefined) {
|
||||
value = this._defaults[key];
|
||||
|
|
Loading…
Reference in a new issue