geojs 1.10.4 → 1.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/geo.js +22 -4
- package/geo.lean.js +22 -4
- package/geo.lean.min.js +2 -2
- package/geo.min.js +2 -2
- package/package.json +1 -1
- package/src/annotation/annotation.js +6 -0
- package/src/annotation/polygonAnnotation.js +1 -1
- package/src/object.js +9 -0
package/package.json
CHANGED
|
@@ -141,6 +141,9 @@ var annotation = function (type, args) {
|
|
|
141
141
|
* Clean up any resources that the annotation is using.
|
|
142
142
|
*/
|
|
143
143
|
this._exit = function () {
|
|
144
|
+
if (m_this.layer()) {
|
|
145
|
+
m_this.layer().geoOff(geo_event.mousemove, m_this._cursorHandleMousemove);
|
|
146
|
+
}
|
|
144
147
|
};
|
|
145
148
|
|
|
146
149
|
/**
|
|
@@ -754,6 +757,9 @@ var annotation = function (type, args) {
|
|
|
754
757
|
*/
|
|
755
758
|
this.coordinates = function (gcs) {
|
|
756
759
|
var coord = m_this._coordinates() || [];
|
|
760
|
+
if (!coord.length && (!coord.outer || !coord.outer.length)) {
|
|
761
|
+
coord = [];
|
|
762
|
+
}
|
|
757
763
|
if (m_this.layer()) {
|
|
758
764
|
var map = m_this.layer().map();
|
|
759
765
|
gcs = (gcs === null ? map.gcs() : (
|
|
@@ -134,7 +134,7 @@ var polygonAnnotation = function (args) {
|
|
|
134
134
|
(coord.inner || []).forEach((h) => result[0].push(h.map((pt) => [pt.x, pt.y])));
|
|
135
135
|
return result;
|
|
136
136
|
}
|
|
137
|
-
if (coord.length < 3) {
|
|
137
|
+
if (coord.length < 3 || !coord.map) {
|
|
138
138
|
return [];
|
|
139
139
|
}
|
|
140
140
|
return [[coord.map((pt) => [pt.x, pt.y])]];
|
package/src/object.js
CHANGED
|
@@ -273,6 +273,15 @@ var object = function () {
|
|
|
273
273
|
return m_this;
|
|
274
274
|
};
|
|
275
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Report the current event handlers.
|
|
278
|
+
*
|
|
279
|
+
* @returns {object} An object with all of the event handlers.
|
|
280
|
+
*/
|
|
281
|
+
this._eventHandlers = function () {
|
|
282
|
+
return m_eventHandlers;
|
|
283
|
+
};
|
|
284
|
+
|
|
276
285
|
/**
|
|
277
286
|
* Free all resources and destroy the object.
|
|
278
287
|
*/
|