@@ -22,6 +22,7 @@ provides: App.Layer
2222...
2323*/
2424
25+
2526/** @class App.Layer */
2627declare ( 'LibCanvas.App.Layer' , {
2728
@@ -31,12 +32,12 @@ declare( 'LibCanvas.App.Layer', {
3132 intersection : 'auto' // auto|manual|all
3233 } ) . set ( settings ) ;
3334
34- this . intersection = this . settings . get ( 'intersection' ) ;
35- this . redrawAll = this . intersection === 'all' || this . intersection === 'full' ;
35+ this . intersection = this . settings . get ( 'intersection' ) ;
36+ this . redrawAllMode = this . intersection === 'all' || this . intersection === 'full' ;
3637
3738 this . app = app ;
3839 this . elements = [ ] ;
39- this . redraw = this . redrawAll ? this . elements : [ ] ;
40+ this . redraw = this . redrawAllMode ? this . elements : [ ] ;
4041 this . clear = [ ] ;
4142 this . createDom ( ) ;
4243 } ,
@@ -73,6 +74,11 @@ declare( 'LibCanvas.App.Layer', {
7374 return this ;
7475 } ,
7576
77+ redrawAll : function ( ) {
78+ this . elements . invoke ( 'redraw' ) ;
79+ return this ;
80+ } ,
81+
7682 /** @private */
7783 tick : function ( time ) {
7884 if ( this . stopped ) return this ;
@@ -196,7 +202,7 @@ declare( 'LibCanvas.App.Layer', {
196202 if ( element . layer == this && ! element . redrawRequested ) {
197203 this . needUpdate = true ;
198204 element . redrawRequested = true ;
199- if ( ! this . redrawAll ) {
205+ if ( ! this . redrawAllMode ) {
200206 this . redraw . push ( element ) ;
201207 }
202208 }
@@ -235,4 +241,4 @@ declare( 'LibCanvas.App.Layer', {
235241 }
236242 }
237243
238- } ) ;
244+ } ) ;
0 commit comments