-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new parameters to Mask and filter (#110)
* Add new parameters to Mask and filter Add new image to legend Fix constructor options in Legend * update ol ext deps * fix arg
- Loading branch information
1 parent
ecffd3e
commit 3bf8bcd
Showing
7 changed files
with
314 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import ol_Object from 'ol/Object'; | ||
import { Size } from 'ol/size'; | ||
|
||
export interface Options { | ||
url: string, | ||
title?: string | ||
img?: HTMLImageElement | HTMLCanvasElement | ||
className?: string; | ||
width?: number; | ||
} | ||
/** A class for legend image | ||
* @constructor | ||
* @fires changed | ||
* @param {Object} options | ||
* @param {string} url | ||
* @param {string} [title] | ||
* @param {HTMLImageElement|HTMLCanvasElement} [img] an image to display | ||
* @param {string} [src] legend image url (if no img option) | ||
* @param {string} [className] 'center' to center the title | ||
* @param {number} [width] legend width, default use the image width | ||
*/ | ||
export default class Image extends ol_Object { | ||
|
||
constructor(options?: Options); | ||
/** Set the legend title | ||
* @param {string} title | ||
*/ | ||
setTitle(title: string): void; | ||
|
||
/** Set the item width | ||
* @param {number} [width] legend width, default use the image width | ||
*/ | ||
setWidth(width?: number): void; | ||
/** Get image width | ||
* @return {number} | ||
*/ | ||
getWidth(): number; | ||
|
||
/** Get image height | ||
* @return {number} | ||
*/ | ||
getHeight(): number; | ||
|
||
/** Get Image | ||
* @returns {Image} | ||
*/ | ||
getImage(): HTMLImageElement | HTMLCanvasElement | ||
|
||
/** Get element | ||
* @param {Size} size symbol size | ||
*/ | ||
getElement(size: Size, onclick: (click: boolean) => void): HTMLElement | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.