forked from 0x2620/oxjs
add documentation stubs
This commit is contained in:
parent
b3fce3a28a
commit
509745407b
102 changed files with 613 additions and 163 deletions
|
|
@ -1,5 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
|
|
@ -1442,25 +1440,45 @@ Ox.Map = function(options, self) {
|
|||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
addPlace <f> addPlace
|
||||
(data) -> <u> add place to places
|
||||
@*/
|
||||
that.addPlace = function(data) {
|
||||
addPlaceToPlaces(data);
|
||||
};
|
||||
|
||||
/*@
|
||||
getKey <f> getKey
|
||||
() -> <o> get key
|
||||
@*/
|
||||
that.getKey = function() {
|
||||
return self.shiftKey ? 'shift'
|
||||
: self.metaKey ? 'meta'
|
||||
: null;
|
||||
};
|
||||
|
||||
/*@
|
||||
getSelectedPlace <f> getSelectedPlace
|
||||
() -> <o> get selected place
|
||||
@*/
|
||||
that.getSelectedPlace = function() {
|
||||
return getSelectedPlace();
|
||||
}
|
||||
|
||||
/*@
|
||||
editPlace <f> editPlace
|
||||
() -> <o> edit selected place
|
||||
@*/
|
||||
that.editPlace = function() {
|
||||
getSelectedPlace().edit();
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
findPlace <f> findPlace
|
||||
(name, callback) -> <o> find place and pass to callback
|
||||
@*/
|
||||
that.findPlace = function(name, callback) {
|
||||
getPlaceByName(name, function(place) {
|
||||
if (place) {
|
||||
|
|
@ -1474,22 +1492,38 @@ Ox.Map = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
newPlace <f> newPlace
|
||||
(place) -> <o> add place to map
|
||||
@*/
|
||||
that.newPlace = function(place) {
|
||||
addPlaceToMap(place);
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
panToPlace <f> panToPlace
|
||||
() -> <o> pan to place
|
||||
@*/
|
||||
that.panToPlace = function() {
|
||||
panToPlace();
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
removePlace <f> removePlace
|
||||
() -> <o> remove selected place from places
|
||||
@*/
|
||||
that.removePlace = function() {
|
||||
// fixme: removePlaceFromPlaces() ?
|
||||
removePlace();
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
resizeMap <f> resizeMap
|
||||
() -> <o> resize map
|
||||
@*/
|
||||
that.resizeMap = function() {
|
||||
// keep center on resize has been commented out
|
||||
// var center = self.map.getCenter();
|
||||
|
|
@ -1517,6 +1551,10 @@ Ox.Map = function(options, self) {
|
|||
return that;
|
||||
}
|
||||
|
||||
/*@
|
||||
value <f> value
|
||||
(id, key, value) -> <o> set id, key to value
|
||||
@*/
|
||||
that.value = function(id, key, value) {
|
||||
// fixme: should be like the corresponding List/TextList/etc value function
|
||||
Ox.Log('Map', 'Map.value', id, key, value);
|
||||
|
|
@ -1535,11 +1573,19 @@ Ox.Map = function(options, self) {
|
|||
return that;
|
||||
}
|
||||
|
||||
/*@
|
||||
zoomToPlace <f> zoomToPlace
|
||||
() -> <o> zoom to selected place
|
||||
@*/
|
||||
that.zoomToPlace = function() {
|
||||
zoomToPlace();
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
zoom <f> zoom
|
||||
(value) -> <o> zoom to value
|
||||
@*/
|
||||
that.zoom = function(value) {
|
||||
zoom(value);
|
||||
return that;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue