Add the options argument to openlayers custom control (#10099)

* Add arguments to ol.control.Control's constructor

* Define the olx.control.ControlOptions interface
This commit is contained in:
osechet
2016-07-19 17:03:27 -07:00
committed by Mohamed Hegazy
parent c820a48f5e
commit d726a1348e
+20
View File
@@ -1079,6 +1079,25 @@ declare namespace olx {
rightHanded?: boolean;
}
}
namespace control {
interface ControlOptions {
/**
* The element is the control's container element. This only needs to be specified if you're developing a custom control.
*/
element?: Element;
/**
* Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
*/
render?: any;
/**
* Specify a target if you want the control to be rendered outside of the map's viewport.
*/
target?: Element | string;
}
}
}
/**
@@ -2395,6 +2414,7 @@ declare namespace ol {
}
class Control {
constructor(options: olx.control.ControlOptions);
}
class FullScreen {