mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-14 08:49:50 -04:00
Improve some comments.
This commit is contained in:
parent
2412942d04
commit
bb6e1e686f
1 changed files with 4 additions and 5 deletions
|
@ -3690,7 +3690,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the _updateVersion of the item to see if it got drawn in the draw
|
* Checks the _updateVersion of the item to see if it got drawn in the draw
|
||||||
* loop. If the version is out of sync, the item is either not in the DOM
|
* loop. If the version is out of sync, the item is either not in the DOM
|
||||||
* anymore or is invisible.
|
* anymore or is invisible.
|
||||||
*/
|
*/
|
||||||
|
@ -3704,10 +3704,9 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
if (parent instanceof CompoundPath)
|
if (parent instanceof CompoundPath)
|
||||||
return parent._isUpdated(updateVersion);
|
return parent._isUpdated(updateVersion);
|
||||||
// In case a parent is visible but isn't drawn (e.g. opacity == 0), the
|
// In case a parent is visible but isn't drawn (e.g. opacity == 0), the
|
||||||
// _updateVersion of all its children will not be updated, the children
|
// _updateVersion of all its children will not be updated, but the
|
||||||
// should still be considered updated, and selections should be drawn
|
// children should still be considered updated, and selections should be
|
||||||
// for them. Excluded are only items with _visible == false.
|
// drawn for them. Excluded are only items with _visible == false:
|
||||||
// Address this here:
|
|
||||||
if (version !== updateVersion && parent && parent._visible
|
if (version !== updateVersion && parent && parent._visible
|
||||||
&& parent._isUpdated(updateVersion))
|
&& parent._isUpdated(updateVersion))
|
||||||
version = this._updateVersion = updateVersion;
|
version = this._updateVersion = updateVersion;
|
||||||
|
|
Loading…
Reference in a new issue