higlass
Version:
HiGlass Hi-C / genomic / large data viewer
130 lines (129 loc) • 4.03 kB
TypeScript
export default OSMTilesTrack;
declare class OSMTilesTrack extends PixiTrack<any> {
/**
* A track that must pull remote tiles
*
* @param scene: A PIXI.js scene to draw everything to.
* @param server: The server to pull tiles from.
* @param tilesetUid: The data set to get the tiles from the server
*/
constructor(context: any, options: any);
visibleTiles: Set<any>;
visibleTileIds: Set<any>;
fetching: Set<any>;
fetchedTiles: {};
tileGraphics: {};
minX: number;
maxX: number;
minY: any;
maxY: any;
maxZoom: number;
maxWidth: number;
animate: any;
uuid: string;
refreshTilesDebounced: {
(...args: any[]): void;
cancel(): void;
};
/**
* Return the set of ids of all tiles which are both visible and fetched.
*/
visibleAndFetchedIds(): string[];
visibleAndFetchedTiles(): any[];
/**
* Set which tiles are visible right now.
*
* @param tiles: A set of tiles which will be considered the currently visible
* tile positions.
*/
setVisibleTiles(tilePositions: any): void;
removeAllTiles(): void;
refreshTiles(): void;
/**
* Remove obsolete tiles
*
* @param toRemoveIds: An array of tile ids to remove from the list of fetched tiles.
*/
removeTiles(toRemoveIds: any): void;
tileToLocalId(tile: any): any;
/**
* The tile identifier used on the server.
* @param {array} tile Contains `[zoomLevel, xPos, yPos]`.
* @return {string} Remote ID string
*/
tileToRemoteId(tile: array): string;
localToRemoteId(remoteId: any): any;
calculateVisibleTiles(): void;
zoomLevel: number | undefined;
xTiles: number[] | undefined;
yTiles: number[] | undefined;
zoomed(newXScale: any, newYScale: any, k: any, tx: any, ty: any): void;
setPosition(newPosition: any): void;
setDimensions(newDimensions: any): void;
/**
* Check to see if all the visible tiles are loaded.
*
* If they are, remove all other tiles.
*/
areAllVisibleTilesLoaded(): boolean;
/**
* Function is called when all tiles that should be visible have
* been received.
*/
allTilesLoaded(): void;
minValue(_: any): any;
maxValue(_: any): any;
minRawValue(): any;
maxRawValue(): any;
/**
* Get the tile's position in its coordinate system.
*/
getTilePosAndDimensions(zoomLevel: any, tilePos: any): {
tileX: number;
tileY: any;
tileWidth: number;
tileHeight: number;
};
setSpriteProperties(sprite: any, zoomLevel: any, tilePos: any): void;
initTile(tile: any): void;
updateTile(tile: any): void;
destroyTile(tile: any): void;
/**
* Add graphics for tiles that have no graphics
*/
addMissingGraphics(): void;
/**
* Change the graphics for existing tiles
*/
updateExistingGraphics(): void;
/**
* Make sure that we have a one to one mapping between tiles
* and graphics objects
*/
synchronizeTilesAndGraphics(): void;
/**
* Extract drawable data from a tile loaded by a generic tile loader
*
* @param tile: A tile returned by a TiledArea.
* @param dataLoader: A function for extracting drawable data from a tile. This
* usually means differentiating the between dense and sparse
* tiles and putting the data into an array.
*/
loadTileData(tile: any, dataLoader: any): any;
/**
* Get the url used to fetch the tile data
*/
getTileUrl(tileZxy: any): string;
fetchNewTiles(toFetch: any): void;
/**
* We've gotten a bunch of tiles from the server in
* response to a request from fetchTiles.
*/
receivedTiles(loadedTiles: any): void;
/**
* Draw a tile on some graphics
*/
drawTile(): void;
refScalesChanged(refXScale: any, refYScale: any): void;
}
import PixiTrack from './PixiTrack';