setChildIndex 入门[Javascript]

时间:2019-12-08 发布者: 访问量:3745

setChildIndex常用有以下几种:

置顶:容器.setChildIndex(对象A,容器.numChildren-1);

置底:容器.setChildIndex(对象A,0);

插入对象B的前面:容器.setChildIndex(对象A,容器.getChildIndex(对象B));

插入对象B的后面:容器.setChildIndex(对象A,容器.getChildIndex(对象B)-1);
————————————————
版权声明:本文为CSDN博主「dodomail」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/dodomail/article/details/83920674
发布于
  用户评论
    生活编程