Skip to content

Commit

Permalink
Merge pull request bluehalo#42 from Asymmetrik/develop
Browse files Browse the repository at this point in the history
Fixing the typings for hover handlers
  • Loading branch information
reblace authored Aug 29, 2017
2 parents 47060e3 + 3f76e0d commit befbae2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/leaflet-d3.js

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

2 changes: 1 addition & 1 deletion dist/leaflet-d3.min.js

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

20 changes: 10 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ declare namespace L {

dispatch(): any;

hoverHandler(): HoverHandler;
hoverHandler(v: HoverHandler): this;
hoverHandler(): HexbinHoverHandler;
hoverHandler(v: HexbinHoverHandler): this;

getLatLngs(): any[];
toGeoJSON(): any[];
Expand All @@ -90,35 +90,35 @@ declare namespace L {
pointerEvents?: string
}

interface HoverHandler {
interface HexbinHoverHandler {
mouseover(hexLayer: HexbinLayer, data: any): void;
mouseout(hexLayer: HexbinLayer, data: any): void;
}

namespace HoverHandler {
namespace HexbinHoverHandler {

interface TooltipHoverHandler extends HoverHandler {}
interface TooltipHoverHandler extends HexbinHoverHandler {}
interface TooltipOptions {
tooltipContent: (d: any) => string;
}
function tooltip(v: TooltipOptions): TooltipHoverHandler;

interface ResizeFillHoverHandler extends HoverHandler {}
interface ResizeFillHoverHandler extends HexbinHoverHandler {}
function resizeFill(): ResizeFillHoverHandler;

interface ResizeScaleHoverHandler extends HoverHandler {}
interface ResizeScaleHoverHandler extends HexbinHoverHandler {}
interface ResizeScaleOptions {
radiusScale: number;
}
function resizeScale(v: ResizeScaleOptions): ResizeScaleHoverHandler;

interface CompoundHoverHandler extends HoverHandler {}
interface CompoundHoverHandler extends HexbinHoverHandler {}
interface CompoundOptions {
handlers: HoverHandler[];
handlers: HexbinHoverHandler[];
}
function compound(v: CompoundOptions): CompoundHoverHandler;

interface NoneHoverHandler extends HoverHandler {}
interface NoneHoverHandler extends HexbinHoverHandler {}
function none(): NoneHoverHandler;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"artifactName": "leaflet-d3",
"moduleName": "leafletD3",
"description": "Custom d3 layers for leaflet",
"version": "3.0.1",
"version": "3.0.2",
"author": "Asymmetrik, Ltd.",
"copyright": "Copyright (c) 2007-2017 Asymmetrik Ltd, a Maryland Corporation",
"license": "MIT",
Expand Down

0 comments on commit befbae2

Please sign in to comment.