Skip to content

Commit

Permalink
Website updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Dec 16, 2024
1 parent ca70d44 commit 48181eb
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 36 deletions.
2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/examples/offscreen-canvas.worker.worker.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions dist/en/main/ol/TileQueue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
*/
export function getTilePriority(frameState: import("./Map.js").FrameState, tile: import("./Tile.js").default, tileSourceKey: string, tileCenter: import("./coordinate.js").Coordinate, tileResolution: number): number;
export default TileQueue;
export type PriorityFunction = (arg0: import("./Tile.js").default, arg1: string, arg2: import("./coordinate.js").Coordinate, arg3: number) => number;
export type PriorityFunction = (arg0: import("./Tile.js").default, arg1: string, arg2: import("./tilecoord.js").TileCoord, arg3: number) => number;
export type TileQueueElement = [import("./Tile.js").default, string, import("./tilecoord.js").TileCoord, number];
/**
* @typedef {function(import("./Tile.js").default, string, import("./coordinate.js").Coordinate, number): number} PriorityFunction
* @typedef {function(import("./Tile.js").default, string, import('./tilecoord.js').TileCoord, number): number} PriorityFunction
*/
declare class TileQueue extends PriorityQueue<any> {
/**
* @typedef {[import('./Tile.js').default, string, import('./tilecoord.js').TileCoord, number]} TileQueueElement
*/
/**
* @extends PriorityQueue<TileQueueElement>}
*/
declare class TileQueue extends PriorityQueue<TileQueueElement> {
/**
* @param {PriorityFunction} tilePriorityFunction Tile priority function.
* @param {function(): ?} tileChangeCallback Function called on each tile change event.
Expand All @@ -35,12 +42,6 @@ declare class TileQueue extends PriorityQueue<any> {
* @type {!Object<string,boolean>}
*/
private tilesLoadingKeys_;
/**
* @param {Array} element Element.
* @return {boolean} The element was added to the queue.
* @override
*/
override enqueue(element: any[]): boolean;
/**
* @return {number} Number of tiles loading.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/en/main/ol/TileQueue.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 11 additions & 19 deletions dist/en/main/ol/TileQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,25 @@ import EventType from './events/EventType.js';
import PriorityQueue, {DROP} from './structs/PriorityQueue.js';

/**
* @typedef {function(import("./Tile.js").default, string, import("./coordinate.js").Coordinate, number): number} PriorityFunction
* @typedef {function(import("./Tile.js").default, string, import('./tilecoord.js').TileCoord, number): number} PriorityFunction
*/

/**
* @typedef {[import('./Tile.js').default, string, import('./tilecoord.js').TileCoord, number]} TileQueueElement
*/

/**
* @extends PriorityQueue<TileQueueElement>}
*/
class TileQueue extends PriorityQueue {
/**
* @param {PriorityFunction} tilePriorityFunction Tile priority function.
* @param {function(): ?} tileChangeCallback Function called on each tile change event.
*/
constructor(tilePriorityFunction, tileChangeCallback) {
super(
/**
* @param {Array} element Element.
* @return {number} Priority.
*/
function (element) {
return tilePriorityFunction.apply(null, element);
},
/**
* @param {Array} element Element.
* @return {string} Key.
*/
function (element) {
return /** @type {import("./Tile.js").default} */ (element[0]).getKey();
},
(element) => tilePriorityFunction.apply(null, element),
(element) => element[0].getKey(),
);

/** @private */
Expand All @@ -55,7 +50,7 @@ class TileQueue extends PriorityQueue {
}

/**
* @param {Array} element Element.
* @param {TileQueueElement} element Element.
* @return {boolean} The element was added to the queue.
* @override
*/
Expand Down Expand Up @@ -110,9 +105,6 @@ class TileQueue extends PriorityQueue {
newLoads < maxNewLoads &&
this.getCount() > 0
) {
/**
* @type {import("./Tile.js").default}
*/
const tile = this.dequeue()[0];
const tileKey = tile.getKey();
const state = tile.getState();
Expand Down
2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

0 comments on commit 48181eb

Please sign in to comment.