Skip to content

Commit

Permalink
Fix perspective map and hex grid
Browse files Browse the repository at this point in the history
Fixes #138
  • Loading branch information
Siedlerchr committed Aug 31, 2023
1 parent c23bdec commit 3b69a15
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions @types/ol-ext/map/PerspectiveMap.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Options as MapOptions } from 'ol/Map'
import type { MapOptions } from 'ol/Map'
import Map from 'ol/Map'
import type { Condition } from 'ol/events/condition'

Expand All @@ -17,7 +17,7 @@ export class PerspectiveMap extends Map {
* @param {olx.MapOptions=} options
* @param {ol.events.condition} tiltCondition , default altKeyOnly
*/
constructor(options?: MapOptions);
constructor(options?: Options);

/** Get pixel ratio for the map
*/
Expand Down
30 changes: 14 additions & 16 deletions @types/ol-ext/render/HexGrid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,20 @@ export default class HexGrid extends Object {
/** Convert offset to cube coords
* @param {Coordinate} c cube coordinate
* @return {Coordinate} offset coordinate
* /
HexGrid.prototype.cube2offset = function(c)
{ return hex2offset(cube2hex(c));
};
/** Convert cube to offset coords
* @param {Coordinate} o offset coordinate
* @return {Coordinate} cube coordinate
* /
HexGrid.prototype.offset2cube = function (o)
{ return hex2cube(offset2Hex(o));
};
/** Round cube coords
* @param {Coordinate} h cube coordinate
* @return {Coordinate} rounded cube coordinate
*/
cube_round(c: Coordinate, o: Coordinate, h: Coordinate): void;
*/
cube2offset(c: Coordinate): Coordinate

/** Convert cube to offset coords
* @param {Coordinate} o offset coordinate
* @return {Coordinate} cube coordinate
*/
offsetToCube(o: Coordinate): Coordinate

/** Round cube coords
* @param {Coordinate} h cube coordinate
* @return {Coordinate} rounded cube coordinate
*/
cube_round(c: Coordinate, o: Coordinate, h: Coordinate): Coordinate;

/** Round axial coords
* @param {Coordinate} h axial coordinate
Expand Down
1 change: 0 additions & 1 deletion @types/ol-ext/render/Pulse.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Coordinate } from 'ol/coordinate'
import type { ProjectionLike } from 'ol/proj'
import type { Style } from 'ol/style'
import { Stroke, Image } from 'ol/style'

/** The map is the core component of OpenLayers.
* For a map to render, a view, one or more layers, and a target container are needed:
Expand Down

0 comments on commit 3b69a15

Please sign in to comment.