@ Override public final Scene moveUp ( final Layer layer ) { if ( ( null != layer ) && ( LienzoCore . IS_CANVAS_SUPPORTED ) ) { final int size = getElement ( ) . getChildCount ( ) ; if ( size < 2 ) { return this ; } final DivElement element = layer . getElement ( ) ; for ( int i = 0 ; i < size ; i ++ ) { final DivElement look = getElement ( ) . getChild ( i ) . cast ( ) ; if ( look == element ) { if ( ( i + 1 ) == size ) { break ; // already at top } getElement ( ) . removeChild ( element ) ; getElement ( ) . insertAfter ( element , getElement ( ) . getChild ( i + 1 ) ) ; break ; } } final NFastArrayList < Layer > layers = getChildNodes ( ) ; if ( null != layers ) { layers . moveUp ( layer ) ; } } return this ; }
Moves the layer one level up in this scene .