mirror of
https://github.com/konvajs/konva.git
synced 2025-05-02 20:05:08 +08:00
made performance improvement for isVisible method, suggested by mysza
This commit is contained in:
parent
3d4d2d20c0
commit
17644fcb8f
2
dist/kinetic-core.js
vendored
2
dist/kinetic-core.js
vendored
@ -673,7 +673,7 @@ Kinetic.Node = Kinetic.Class.extend({
|
||||
* is invisible, this means that the shape is also invisible
|
||||
*/
|
||||
isVisible: function() {
|
||||
if(this.getParent() && !this.getParent().isVisible()) {
|
||||
if(this.attrs.visible && this.getParent() && !this.getParent().isVisible()) {
|
||||
return false;
|
||||
}
|
||||
return this.attrs.visible;
|
||||
|
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -262,7 +262,7 @@ Kinetic.Node = Kinetic.Class.extend({
|
||||
* is invisible, this means that the shape is also invisible
|
||||
*/
|
||||
isVisible: function() {
|
||||
if(this.getParent() && !this.getParent().isVisible()) {
|
||||
if(this.attrs.visible && this.getParent() && !this.getParent().isVisible()) {
|
||||
return false;
|
||||
}
|
||||
return this.attrs.visible;
|
||||
|
Loading…
Reference in New Issue
Block a user