You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add parent node and two child nodes(child1, child2)
Run child1.hide()
Run parent node.hide()
Run parent node.show()
In this case, child1(red) should not be displayed, but it does.
There might be two possible ways to fix this,
Modify DOMElement.onShow not to change property when its Node.isShown() is false
Modify Dispatch.show to ignore nodes which Node.isShown() is false
I think although Node.isShown() is false, Node would be better to get onShow events from Dispatch.
So I chose the first one to fix this.
How do you think?
'use strict';// Famous dependenciesvarDOMElement=require('famous/dom-renderables/DOMElement');varFamousEngine=require('famous/core/FamousEngine');FamousEngine.init();varnode=FamousEngine.createScene().addChild();varchild1=node.addChild();varchild2=node.addChild();child1.el=newDOMElement(child1,{tagName: 'div',properties: {'background-color': 'red'}});child2.el=newDOMElement(child2,{tagName: 'div',properties: {'background-color': 'blue'}});child1.setSizeMode('absolute','absolute').setAbsoluteSize(100,100).setAlign(0.5,0.5).setMountPoint(0.5,0.5).setPosition(-50,0);child2.setSizeMode('absolute','absolute').setAbsoluteSize(100,100).setAlign(0.5,0.5).setMountPoint(0.5,0.5).setPosition(50,0);child1.hide();node.hide();node.show();/* * child1(red) should not be shown */
The text was updated successfully, but these errors were encountered:
panarch
added a commit
to panarch/engine
that referenced
this issue
Aug 16, 2015
Here's an example to test.
In this case, child1(red) should not be displayed, but it does.
There might be two possible ways to fix this,
I think although Node.isShown() is false, Node would be better to get onShow events from Dispatch.
So I chose the first one to fix this.
How do you think?
The text was updated successfully, but these errors were encountered: