Browse files

Fix js DisplayList add/remove conditions.

  • Loading branch information...
1 parent b19e37d commit 651fa23271242e903ae53719ff0ccb47e886b8ca @vizanto vizanto committed Feb 5, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 prime-display/src/prime/js/display/DisplayList.hx
View
4 prime-display/src/prime/js/display/DisplayList.hx
@@ -17,7 +17,7 @@ class DisplayList
public #if !noinline inline #end function add(object:DOMElem)
{
- if (object.elem.parentNode != target.elem)
+ if (object.parent != target)
{
if (object.elem.parentNode != null) object.elem.parentNode.removeChild(object.elem);
object.style.display = "block";
@@ -28,7 +28,7 @@ class DisplayList
public #if !noinline inline #end function remove(object:DOMElem)
{
- if (object.elem.parentNode == target.elem)
+ if (object.parent == target)
{
// --- Reduce reflows by hiding from DOM, instead of removing an element immediately:
//target.elem.removeChild(object.elem);

0 comments on commit 651fa23

Please sign in to comment.