@@ -263,18 +263,18 @@ export default class PgInputPixelEditor extends HTMLElement {
263263 }
264264 const totalSize = this . size + this . gridSize ;
265265 // Edit Layer
266- this . #editLayerContext. fillStyle = WHITE ;
267- this . #editLayerContext. fillRect (
268- x * totalSize - ( this . gridSize ) + 1 ,
269- y * totalSize - ( this . gridSize ) + 1 ,
270- this . size + ( this . gridSize * 2 ) - 2 ,
271- this . size + ( this . gridSize * 2 ) - 2
272- ) ;
273266 this . #context. clearRect ( x * totalSize , y * totalSize , this . size , this . size ) ;
274267 this . #editLayerContext. clearRect ( x * totalSize , y * totalSize , this . size , this . size ) ;
275268 this . #noEditLayerContext. clearRect ( x * totalSize , y * totalSize , this . size , this . size ) ;
276269 // Edit layer
277270 if ( this . #colors[ color ] [ 3 ] !== 0 ) {
271+ this . #editLayerContext. fillStyle = WHITE ;
272+ this . #editLayerContext. fillRect (
273+ x * totalSize - ( this . gridSize ) + 1 ,
274+ y * totalSize - ( this . gridSize ) + 1 ,
275+ this . size + ( this . gridSize * 2 ) - 2 ,
276+ this . size + ( this . gridSize * 2 ) - 2
277+ ) ;
278278 this . #editLayerContext. fillStyle = toColor ( this . #colors[ color ] ) ;
279279 this . #editLayerContext. fillRect ( x * totalSize + 1 , y * totalSize + 1 , this . size - 2 , this . size - 2 ) ;
280280 }
0 commit comments