refactor: rename visible to visibleOn

This commit is contained in:
Mikhail Zolotukhin 2021-10-21 02:05:37 +03:00
parent cd1b5026b2
commit 033fb19570
3 changed files with 8 additions and 8 deletions

View File

@ -86,7 +86,7 @@ export interface DriverWindow {
* Whether the window is visible on the specified surface
* @param surf the surface to check against
*/
visible(surf: DriverSurface): boolean;
visibleOn(surf: DriverSurface): boolean;
}
export class DriverWindowImpl implements DriverWindow {
@ -294,7 +294,7 @@ export class DriverWindowImpl implements DriverWindow {
})`;
}
public visible(surf: DriverSurface): boolean {
public visibleOn(surf: DriverSurface): boolean {
const surfImpl = surf as DriverSurfaceImpl;
return (
!this.client.minimized &&

View File

@ -143,7 +143,7 @@ export interface EngineWindow {
* Whether the window is visible on concrete surface
* @param surface the surface visibility on which is checked
*/
visible(surface: DriverSurface): boolean;
visibleOn(surface: DriverSurface): boolean;
/**
* Force apply the geometry *immediately*.
@ -376,8 +376,8 @@ export class EngineWindowImpl implements EngineWindow {
this.window.commit(geometry);
}
public visible(srf: DriverSurface): boolean {
return this.window.visible(srf);
public visibleOn(srf: DriverSurface): boolean {
return this.window.visibleOn(srf);
}
public toString(): string {

View File

@ -83,12 +83,12 @@ export default class WindowStore {
/** Returns all visible windows on the given surface. */
public getVisibleWindows(srf: DriverSurface): EngineWindow[] {
return this.list.filter((win) => win.visible(srf));
return this.list.filter((win) => win.visibleOn(srf));
}
/** Return all visible "Tile" windows on the given surface. */
public getVisibleTiles(srf: DriverSurface): EngineWindow[] {
return this.list.filter((win) => win.tiled && win.visible(srf));
return this.list.filter((win) => win.tiled && win.visibleOn(srf));
}
/**
@ -96,7 +96,7 @@ export default class WindowStore {
* @see Window#tileable
*/
public getVisibleTileables(srf: DriverSurface): EngineWindow[] {
return this.list.filter((win) => win.tileable && win.visible(srf));
return this.list.filter((win) => win.tileable && win.visibleOn(srf));
}
/**