mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -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() {
|
getStyle: function() {
|
||||||
// If this path is part of a CompoundPath, use the paren't style instead
|
// If this path is part of a CompoundPath, use the paren't style instead
|
||||||
var parent = this._parent;
|
var parent = this._parent;
|
||||||
return (parent && parent._type === 'compound-path'
|
return (parent && parent instanceof CompoundPath ? parent : this)._style;
|
||||||
? parent : this)._style;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// DOCS: toShape
|
// DOCS: toShape
|
||||||
|
|
|
@ -175,7 +175,7 @@ var Style = Base.extend(new function() {
|
||||||
// they all have the same style.
|
// they all have the same style.
|
||||||
// If true is passed for dontMerge, don't merge children styles
|
// If true is passed for dontMerge, don't merge children styles
|
||||||
if (!children || children.length === 0 || arguments[0]
|
if (!children || children.length === 0 || arguments[0]
|
||||||
|| this._item._type === 'compound-path') {
|
|| this._item instanceof CompoundPath) {
|
||||||
var value = this._values[key];
|
var value = this._values[key];
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
value = this._defaults[key];
|
value = this._defaults[key];
|
||||||
|
|
Loading…
Reference in a new issue