geojs 1.9.3 → 1.9.4
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/geo.js +93 -17
- package/geo.lean.js +93 -17
- package/geo.lean.min.js +2 -2
- package/geo.min.js +2 -2
- package/package.json +1 -1
- package/src/action.js +1 -4
- package/src/annotation/annotation.js +8 -0
- package/src/annotationLayer.js +15 -7
- package/src/mapInteractor.js +46 -3
- package/src/registry.js +3 -0
- package/src/util/polyops.js +4 -1
package/geo.js
CHANGED
|
@@ -31,10 +31,7 @@ var geo_action = {
|
|
|
31
31
|
zoom: 'geo_action_zoom',
|
|
32
32
|
zoomrotate: 'geo_action_zoom_rotate',
|
|
33
33
|
zoomselect: 'geo_action_zoomselect',
|
|
34
|
-
// annotation actions
|
|
35
|
-
annotation_line: 'geo_annotation_line',
|
|
36
|
-
annotation_polygon: 'geo_annotation_polygon',
|
|
37
|
-
annotation_rectangle: 'geo_annotation_rectangle',
|
|
34
|
+
// annotation actions -- some are also added by the registry
|
|
38
35
|
annotation_edit_handle: 'geo_annotation_edit_handle'
|
|
39
36
|
};
|
|
40
37
|
module.exports = geo_action;
|
|
@@ -221,6 +218,15 @@ var annotation = function annotation(type, args) {
|
|
|
221
218
|
this.id = function () {
|
|
222
219
|
return m_id;
|
|
223
220
|
};
|
|
221
|
+
/**
|
|
222
|
+
* Assign a new id to this annotation.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
this.newId = function () {
|
|
227
|
+
annotationId += 1;
|
|
228
|
+
m_id = annotationId;
|
|
229
|
+
};
|
|
224
230
|
/**
|
|
225
231
|
* Get or set the name of this annotation.
|
|
226
232
|
*
|
|
@@ -4254,6 +4260,10 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
4254
4260
|
var pos = $.inArray(annotation, m_annotations);
|
|
4255
4261
|
|
|
4256
4262
|
if (pos < 0) {
|
|
4263
|
+
while (m_this.annotationById(annotation.id())) {
|
|
4264
|
+
annotation.newId();
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4257
4267
|
m_this.geoTrigger(geo_event.annotation.add_before, {
|
|
4258
4268
|
annotation: annotation
|
|
4259
4269
|
});
|
|
@@ -5188,13 +5198,19 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5188
5198
|
this.toPolygonList = function (opts) {
|
|
5189
5199
|
var poly = [];
|
|
5190
5200
|
opts = opts || {};
|
|
5191
|
-
|
|
5201
|
+
var indices = [];
|
|
5202
|
+
|
|
5203
|
+
if (!opts.annotationIndices) {
|
|
5204
|
+
opts.annotationIndices = {};
|
|
5205
|
+
}
|
|
5206
|
+
|
|
5207
|
+
opts.annotationIndices[m_this.id()] = indices;
|
|
5192
5208
|
m_annotations.forEach(function (annotation, idx) {
|
|
5193
5209
|
if (annotation.toPolygonList) {
|
|
5194
5210
|
annotation.toPolygonList(opts).forEach(function (p) {
|
|
5195
5211
|
return poly.push(p);
|
|
5196
5212
|
});
|
|
5197
|
-
|
|
5213
|
+
indices.push(idx);
|
|
5198
5214
|
}
|
|
5199
5215
|
});
|
|
5200
5216
|
return poly;
|
|
@@ -5220,16 +5236,17 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5220
5236
|
var keepIds = {};
|
|
5221
5237
|
var reusedIds = {};
|
|
5222
5238
|
var correspond, exact, annot;
|
|
5239
|
+
var indices = (opts.annotationIndices || {})[m_this.id()];
|
|
5223
5240
|
|
|
5224
|
-
if (
|
|
5241
|
+
if (indices && opts.correspond && opts.correspond.poly1 && indices.length === opts.correspond.poly1.length) {
|
|
5225
5242
|
correspond = opts.correspond.poly1;
|
|
5226
5243
|
exact = opts.correspond.exact1;
|
|
5227
5244
|
annot = m_this.annotations();
|
|
5228
5245
|
}
|
|
5229
5246
|
|
|
5230
|
-
if (keep !== 'all' && keep !== 'none') {
|
|
5247
|
+
if (keep !== 'all' && keep !== 'none' && annot) {
|
|
5231
5248
|
annot.forEach(function (oldAnnot, idx) {
|
|
5232
|
-
if (
|
|
5249
|
+
if (indices.indexOf(idx) < 0) {
|
|
5233
5250
|
keepIds[oldAnnot.id()] = true;
|
|
5234
5251
|
}
|
|
5235
5252
|
});
|
|
@@ -5256,7 +5273,7 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5256
5273
|
for (var i = 0; i < correspond.length; i += 1) {
|
|
5257
5274
|
if (correspond[i] && correspond[i].indexOf(idx) >= 0) {
|
|
5258
5275
|
var _ret = function () {
|
|
5259
|
-
var orig = annot[
|
|
5276
|
+
var orig = annot[indices[i]];
|
|
5260
5277
|
|
|
5261
5278
|
if (keep !== 'all' && keep !== 'none' && exact && exact[i] && exact[i].indexOf(idx) >= 0) {
|
|
5262
5279
|
keepIds[orig.id()] = true;
|
|
@@ -5308,7 +5325,7 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5308
5325
|
|
|
5309
5326
|
|
|
5310
5327
|
polyAnnot.forEach(function (p) {
|
|
5311
|
-
m_this.addAnnotation(registry.createAnnotation('polygon', p), m_this.gcs(), false);
|
|
5328
|
+
m_this.addAnnotation(registry.createAnnotation('polygon', p), m_this.map().gcs(), false);
|
|
5312
5329
|
update = true;
|
|
5313
5330
|
});
|
|
5314
5331
|
|
|
@@ -19028,8 +19045,8 @@ var Mousetrap = __webpack_require__(3345);
|
|
|
19028
19045
|
* event must occur within this time in milliseconds of the mouse down
|
|
19029
19046
|
* event for it to be considered a click.
|
|
19030
19047
|
* @property {boolean|number} [click.cancelOnMove=true] If true, don't generate
|
|
19031
|
-
* click events if the mouse moved at all. If a positive number, the
|
|
19032
|
-
* at which to cancel click events when the mouse moves.
|
|
19048
|
+
* click events if the mouse moved at all. If a positive number, the
|
|
19049
|
+
* distance at which to cancel click events when the mouse moves.
|
|
19033
19050
|
* @property {object} [keyboard] An object describing which keyboard events are
|
|
19034
19051
|
* handled.
|
|
19035
19052
|
* @property {object} [keyboard.actions] An object with different actions that
|
|
@@ -19042,6 +19059,9 @@ var Mousetrap = __webpack_require__(3345);
|
|
|
19042
19059
|
* an object with keys of the meta keys that are required to be down or
|
|
19043
19060
|
* up for that scale action to trigger. If the value of the meta key is
|
|
19044
19061
|
* truthy, it must be down. If `false`, it must be up.
|
|
19062
|
+
* @property {string[]} [keyboard.metakeyMouseEvents] A list of meta keys
|
|
19063
|
+
* * that, when typed singly, trigger a repeat of the last mousemove or
|
|
19064
|
+
* actionmove event so that listeners can update metakey information.
|
|
19045
19065
|
* @property {boolean} [keyboard.focusHighlight=true] If truthy, when the map
|
|
19046
19066
|
* gains focus, a highlight style is shown around it. This gives an
|
|
19047
19067
|
* indicator that keyboard events will affect the map, but may not be
|
|
@@ -19341,6 +19361,11 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
19341
19361
|
}
|
|
19342
19362
|
},
|
|
19343
19363
|
|
|
19364
|
+
/* This is a list of meta keys that when typed singly trigger a repeat
|
|
19365
|
+
* of the last mousemove or actionmove event so that listeners can
|
|
19366
|
+
* update metakey information. */
|
|
19367
|
+
metakeyMouseEvents: ['shift', 'ctrl', 'shift+ctrl', 'shift+alt', 'shift+meta'],
|
|
19368
|
+
|
|
19344
19369
|
/* if focusHighlight is truthy, then a class is added to the map such
|
|
19345
19370
|
* that when the map gets focus, it is indicated inside the border of
|
|
19346
19371
|
* the map -- browsers usually show focus on the outside, which isn't
|
|
@@ -19768,6 +19793,43 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
19768
19793
|
m_touchHandler.lastEventType = evtType[2];
|
|
19769
19794
|
}
|
|
19770
19795
|
};
|
|
19796
|
+
/**
|
|
19797
|
+
* Repeat a mousemove or actionmove event with new metakey information.
|
|
19798
|
+
*
|
|
19799
|
+
* @param {event} [evt] A Mousetrap event with the key change.
|
|
19800
|
+
* @fires geo.event.mousemove
|
|
19801
|
+
* @fires geo.event.actionmove
|
|
19802
|
+
*/
|
|
19803
|
+
|
|
19804
|
+
|
|
19805
|
+
this._repeatMouseMoveEvent = function (evt) {
|
|
19806
|
+
if (!m_mouse || !m_mouse.modifiers) {
|
|
19807
|
+
return;
|
|
19808
|
+
}
|
|
19809
|
+
|
|
19810
|
+
var old = {
|
|
19811
|
+
alt: m_mouse.modifiers.alt,
|
|
19812
|
+
ctrl: m_mouse.modifiers.ctrl,
|
|
19813
|
+
meta: m_mouse.modifiers.meta,
|
|
19814
|
+
shift: m_mouse.modifiers.shift
|
|
19815
|
+
};
|
|
19816
|
+
|
|
19817
|
+
m_this._getMouseModifiers(evt);
|
|
19818
|
+
|
|
19819
|
+
if (m_mouse.modifiers.alt === old.alt && m_mouse.modifiers.ctrl === old.ctrl && m_mouse.modifiers.meta === old.meta && m_mouse.modifiers.shift === old.shift) {
|
|
19820
|
+
return;
|
|
19821
|
+
}
|
|
19822
|
+
|
|
19823
|
+
if (m_state.boundDocumentHandlers) {
|
|
19824
|
+
m_this.map().geoTrigger(geo_event.actionmove, {
|
|
19825
|
+
state: m_this.state(),
|
|
19826
|
+
mouse: m_this.mouse(),
|
|
19827
|
+
event: evt
|
|
19828
|
+
});
|
|
19829
|
+
} else {
|
|
19830
|
+
m_this.map().geoTrigger(geo_event.mousemove, m_this.mouse());
|
|
19831
|
+
}
|
|
19832
|
+
};
|
|
19771
19833
|
/**
|
|
19772
19834
|
* Retrigger a mouse movement with the current mouse state.
|
|
19773
19835
|
* @fires geo.event.mousemove
|
|
@@ -19836,6 +19898,14 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
19836
19898
|
}
|
|
19837
19899
|
}
|
|
19838
19900
|
|
|
19901
|
+
if (m_options.keyboard.metakeyMouseEvents) {
|
|
19902
|
+
m_options.keyboard.metakeyMouseEvents.forEach(function (meta) {
|
|
19903
|
+
m_keyHandler.bind(meta, m_this._repeatMouseMoveEvent, 'keydown');
|
|
19904
|
+
m_keyHandler.bind(meta, m_this._repeatMouseMoveEvent, 'keyup');
|
|
19905
|
+
bound.push(meta);
|
|
19906
|
+
});
|
|
19907
|
+
}
|
|
19908
|
+
|
|
19839
19909
|
m_boundKeys = bound;
|
|
19840
19910
|
}
|
|
19841
19911
|
|
|
@@ -21384,7 +21454,7 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
21384
21454
|
preventDefault: function preventDefault() {},
|
|
21385
21455
|
simulated: true
|
|
21386
21456
|
};
|
|
21387
|
-
m_keyHandler.trigger(keys);
|
|
21457
|
+
m_keyHandler.trigger(keys, options.event);
|
|
21388
21458
|
return;
|
|
21389
21459
|
}
|
|
21390
21460
|
|
|
@@ -26603,6 +26673,8 @@ module.exports = quadFeature;
|
|
|
26603
26673
|
|
|
26604
26674
|
var $ = __webpack_require__(5638);
|
|
26605
26675
|
|
|
26676
|
+
var geo_action = __webpack_require__(7839);
|
|
26677
|
+
|
|
26606
26678
|
var widgets = {
|
|
26607
26679
|
dom: {}
|
|
26608
26680
|
};
|
|
@@ -27061,6 +27133,7 @@ util.registerAnnotation = function (name, func, features) {
|
|
|
27061
27133
|
func: func,
|
|
27062
27134
|
features: features || {}
|
|
27063
27135
|
};
|
|
27136
|
+
geo_action['annotation_' + name] = 'geo_annotation_' + name;
|
|
27064
27137
|
return old;
|
|
27065
27138
|
};
|
|
27066
27139
|
/**
|
|
@@ -27577,7 +27650,7 @@ module.exports = sceneObject;
|
|
|
27577
27650
|
* @constant
|
|
27578
27651
|
* @type {string}
|
|
27579
27652
|
*/
|
|
27580
|
-
module.exports = "
|
|
27653
|
+
module.exports = "f6ebaf74f3f8b523860d8b780cbd38782bdd81ca";
|
|
27581
27654
|
|
|
27582
27655
|
/***/ }),
|
|
27583
27656
|
|
|
@@ -40171,6 +40244,7 @@ function generateCorrespondence(poly1, poly2, newpoly, results) {
|
|
|
40171
40244
|
results[ekey] = Array(poly.length);
|
|
40172
40245
|
poly.forEach(function (p, idx) {
|
|
40173
40246
|
var found = {};
|
|
40247
|
+
var missed = 0;
|
|
40174
40248
|
p.forEach(function (h) {
|
|
40175
40249
|
return h.forEach(function (pt) {
|
|
40176
40250
|
var key = '_' + pt[0] + '_' + pt[1];
|
|
@@ -40179,11 +40253,13 @@ function generateCorrespondence(poly1, poly2, newpoly, results) {
|
|
|
40179
40253
|
pts[key].forEach(function (val) {
|
|
40180
40254
|
found[val] = (found[val] || 0) + 1;
|
|
40181
40255
|
});
|
|
40256
|
+
} else {
|
|
40257
|
+
missed += 1;
|
|
40182
40258
|
}
|
|
40183
40259
|
});
|
|
40184
40260
|
});
|
|
40185
40261
|
Object.keys(found).forEach(function (nidx) {
|
|
40186
|
-
if (found[nidx] === counts[+nidx]) {
|
|
40262
|
+
if (found[nidx] === counts[+nidx] && !missed && p.length === newpoly[+nidx].length) {
|
|
40187
40263
|
if (!results[ekey][idx]) {
|
|
40188
40264
|
results[ekey][idx] = [];
|
|
40189
40265
|
}
|
|
@@ -40699,7 +40775,7 @@ module.exports = vectorFeature;
|
|
|
40699
40775
|
* @constant
|
|
40700
40776
|
* @type {string}
|
|
40701
40777
|
*/
|
|
40702
|
-
module.exports = "1.9.
|
|
40778
|
+
module.exports = "1.9.4";
|
|
40703
40779
|
|
|
40704
40780
|
/***/ }),
|
|
40705
40781
|
|
package/geo.lean.js
CHANGED
|
@@ -31,10 +31,7 @@ var geo_action = {
|
|
|
31
31
|
zoom: 'geo_action_zoom',
|
|
32
32
|
zoomrotate: 'geo_action_zoom_rotate',
|
|
33
33
|
zoomselect: 'geo_action_zoomselect',
|
|
34
|
-
// annotation actions
|
|
35
|
-
annotation_line: 'geo_annotation_line',
|
|
36
|
-
annotation_polygon: 'geo_annotation_polygon',
|
|
37
|
-
annotation_rectangle: 'geo_annotation_rectangle',
|
|
34
|
+
// annotation actions -- some are also added by the registry
|
|
38
35
|
annotation_edit_handle: 'geo_annotation_edit_handle'
|
|
39
36
|
};
|
|
40
37
|
module.exports = geo_action;
|
|
@@ -221,6 +218,15 @@ var annotation = function annotation(type, args) {
|
|
|
221
218
|
this.id = function () {
|
|
222
219
|
return m_id;
|
|
223
220
|
};
|
|
221
|
+
/**
|
|
222
|
+
* Assign a new id to this annotation.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
this.newId = function () {
|
|
227
|
+
annotationId += 1;
|
|
228
|
+
m_id = annotationId;
|
|
229
|
+
};
|
|
224
230
|
/**
|
|
225
231
|
* Get or set the name of this annotation.
|
|
226
232
|
*
|
|
@@ -4254,6 +4260,10 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
4254
4260
|
var pos = $.inArray(annotation, m_annotations);
|
|
4255
4261
|
|
|
4256
4262
|
if (pos < 0) {
|
|
4263
|
+
while (m_this.annotationById(annotation.id())) {
|
|
4264
|
+
annotation.newId();
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4257
4267
|
m_this.geoTrigger(geo_event.annotation.add_before, {
|
|
4258
4268
|
annotation: annotation
|
|
4259
4269
|
});
|
|
@@ -5188,13 +5198,19 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5188
5198
|
this.toPolygonList = function (opts) {
|
|
5189
5199
|
var poly = [];
|
|
5190
5200
|
opts = opts || {};
|
|
5191
|
-
|
|
5201
|
+
var indices = [];
|
|
5202
|
+
|
|
5203
|
+
if (!opts.annotationIndices) {
|
|
5204
|
+
opts.annotationIndices = {};
|
|
5205
|
+
}
|
|
5206
|
+
|
|
5207
|
+
opts.annotationIndices[m_this.id()] = indices;
|
|
5192
5208
|
m_annotations.forEach(function (annotation, idx) {
|
|
5193
5209
|
if (annotation.toPolygonList) {
|
|
5194
5210
|
annotation.toPolygonList(opts).forEach(function (p) {
|
|
5195
5211
|
return poly.push(p);
|
|
5196
5212
|
});
|
|
5197
|
-
|
|
5213
|
+
indices.push(idx);
|
|
5198
5214
|
}
|
|
5199
5215
|
});
|
|
5200
5216
|
return poly;
|
|
@@ -5220,16 +5236,17 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5220
5236
|
var keepIds = {};
|
|
5221
5237
|
var reusedIds = {};
|
|
5222
5238
|
var correspond, exact, annot;
|
|
5239
|
+
var indices = (opts.annotationIndices || {})[m_this.id()];
|
|
5223
5240
|
|
|
5224
|
-
if (
|
|
5241
|
+
if (indices && opts.correspond && opts.correspond.poly1 && indices.length === opts.correspond.poly1.length) {
|
|
5225
5242
|
correspond = opts.correspond.poly1;
|
|
5226
5243
|
exact = opts.correspond.exact1;
|
|
5227
5244
|
annot = m_this.annotations();
|
|
5228
5245
|
}
|
|
5229
5246
|
|
|
5230
|
-
if (keep !== 'all' && keep !== 'none') {
|
|
5247
|
+
if (keep !== 'all' && keep !== 'none' && annot) {
|
|
5231
5248
|
annot.forEach(function (oldAnnot, idx) {
|
|
5232
|
-
if (
|
|
5249
|
+
if (indices.indexOf(idx) < 0) {
|
|
5233
5250
|
keepIds[oldAnnot.id()] = true;
|
|
5234
5251
|
}
|
|
5235
5252
|
});
|
|
@@ -5256,7 +5273,7 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5256
5273
|
for (var i = 0; i < correspond.length; i += 1) {
|
|
5257
5274
|
if (correspond[i] && correspond[i].indexOf(idx) >= 0) {
|
|
5258
5275
|
var _ret = function () {
|
|
5259
|
-
var orig = annot[
|
|
5276
|
+
var orig = annot[indices[i]];
|
|
5260
5277
|
|
|
5261
5278
|
if (keep !== 'all' && keep !== 'none' && exact && exact[i] && exact[i].indexOf(idx) >= 0) {
|
|
5262
5279
|
keepIds[orig.id()] = true;
|
|
@@ -5308,7 +5325,7 @@ var annotationLayer = function annotationLayer(arg) {
|
|
|
5308
5325
|
|
|
5309
5326
|
|
|
5310
5327
|
polyAnnot.forEach(function (p) {
|
|
5311
|
-
m_this.addAnnotation(registry.createAnnotation('polygon', p), m_this.gcs(), false);
|
|
5328
|
+
m_this.addAnnotation(registry.createAnnotation('polygon', p), m_this.map().gcs(), false);
|
|
5312
5329
|
update = true;
|
|
5313
5330
|
});
|
|
5314
5331
|
|
|
@@ -19028,8 +19045,8 @@ var Mousetrap = __webpack_require__(3345);
|
|
|
19028
19045
|
* event must occur within this time in milliseconds of the mouse down
|
|
19029
19046
|
* event for it to be considered a click.
|
|
19030
19047
|
* @property {boolean|number} [click.cancelOnMove=true] If true, don't generate
|
|
19031
|
-
* click events if the mouse moved at all. If a positive number, the
|
|
19032
|
-
* at which to cancel click events when the mouse moves.
|
|
19048
|
+
* click events if the mouse moved at all. If a positive number, the
|
|
19049
|
+
* distance at which to cancel click events when the mouse moves.
|
|
19033
19050
|
* @property {object} [keyboard] An object describing which keyboard events are
|
|
19034
19051
|
* handled.
|
|
19035
19052
|
* @property {object} [keyboard.actions] An object with different actions that
|
|
@@ -19042,6 +19059,9 @@ var Mousetrap = __webpack_require__(3345);
|
|
|
19042
19059
|
* an object with keys of the meta keys that are required to be down or
|
|
19043
19060
|
* up for that scale action to trigger. If the value of the meta key is
|
|
19044
19061
|
* truthy, it must be down. If `false`, it must be up.
|
|
19062
|
+
* @property {string[]} [keyboard.metakeyMouseEvents] A list of meta keys
|
|
19063
|
+
* * that, when typed singly, trigger a repeat of the last mousemove or
|
|
19064
|
+
* actionmove event so that listeners can update metakey information.
|
|
19045
19065
|
* @property {boolean} [keyboard.focusHighlight=true] If truthy, when the map
|
|
19046
19066
|
* gains focus, a highlight style is shown around it. This gives an
|
|
19047
19067
|
* indicator that keyboard events will affect the map, but may not be
|
|
@@ -19341,6 +19361,11 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
19341
19361
|
}
|
|
19342
19362
|
},
|
|
19343
19363
|
|
|
19364
|
+
/* This is a list of meta keys that when typed singly trigger a repeat
|
|
19365
|
+
* of the last mousemove or actionmove event so that listeners can
|
|
19366
|
+
* update metakey information. */
|
|
19367
|
+
metakeyMouseEvents: ['shift', 'ctrl', 'shift+ctrl', 'shift+alt', 'shift+meta'],
|
|
19368
|
+
|
|
19344
19369
|
/* if focusHighlight is truthy, then a class is added to the map such
|
|
19345
19370
|
* that when the map gets focus, it is indicated inside the border of
|
|
19346
19371
|
* the map -- browsers usually show focus on the outside, which isn't
|
|
@@ -19768,6 +19793,43 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
19768
19793
|
m_touchHandler.lastEventType = evtType[2];
|
|
19769
19794
|
}
|
|
19770
19795
|
};
|
|
19796
|
+
/**
|
|
19797
|
+
* Repeat a mousemove or actionmove event with new metakey information.
|
|
19798
|
+
*
|
|
19799
|
+
* @param {event} [evt] A Mousetrap event with the key change.
|
|
19800
|
+
* @fires geo.event.mousemove
|
|
19801
|
+
* @fires geo.event.actionmove
|
|
19802
|
+
*/
|
|
19803
|
+
|
|
19804
|
+
|
|
19805
|
+
this._repeatMouseMoveEvent = function (evt) {
|
|
19806
|
+
if (!m_mouse || !m_mouse.modifiers) {
|
|
19807
|
+
return;
|
|
19808
|
+
}
|
|
19809
|
+
|
|
19810
|
+
var old = {
|
|
19811
|
+
alt: m_mouse.modifiers.alt,
|
|
19812
|
+
ctrl: m_mouse.modifiers.ctrl,
|
|
19813
|
+
meta: m_mouse.modifiers.meta,
|
|
19814
|
+
shift: m_mouse.modifiers.shift
|
|
19815
|
+
};
|
|
19816
|
+
|
|
19817
|
+
m_this._getMouseModifiers(evt);
|
|
19818
|
+
|
|
19819
|
+
if (m_mouse.modifiers.alt === old.alt && m_mouse.modifiers.ctrl === old.ctrl && m_mouse.modifiers.meta === old.meta && m_mouse.modifiers.shift === old.shift) {
|
|
19820
|
+
return;
|
|
19821
|
+
}
|
|
19822
|
+
|
|
19823
|
+
if (m_state.boundDocumentHandlers) {
|
|
19824
|
+
m_this.map().geoTrigger(geo_event.actionmove, {
|
|
19825
|
+
state: m_this.state(),
|
|
19826
|
+
mouse: m_this.mouse(),
|
|
19827
|
+
event: evt
|
|
19828
|
+
});
|
|
19829
|
+
} else {
|
|
19830
|
+
m_this.map().geoTrigger(geo_event.mousemove, m_this.mouse());
|
|
19831
|
+
}
|
|
19832
|
+
};
|
|
19771
19833
|
/**
|
|
19772
19834
|
* Retrigger a mouse movement with the current mouse state.
|
|
19773
19835
|
* @fires geo.event.mousemove
|
|
@@ -19836,6 +19898,14 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
19836
19898
|
}
|
|
19837
19899
|
}
|
|
19838
19900
|
|
|
19901
|
+
if (m_options.keyboard.metakeyMouseEvents) {
|
|
19902
|
+
m_options.keyboard.metakeyMouseEvents.forEach(function (meta) {
|
|
19903
|
+
m_keyHandler.bind(meta, m_this._repeatMouseMoveEvent, 'keydown');
|
|
19904
|
+
m_keyHandler.bind(meta, m_this._repeatMouseMoveEvent, 'keyup');
|
|
19905
|
+
bound.push(meta);
|
|
19906
|
+
});
|
|
19907
|
+
}
|
|
19908
|
+
|
|
19839
19909
|
m_boundKeys = bound;
|
|
19840
19910
|
}
|
|
19841
19911
|
|
|
@@ -21384,7 +21454,7 @@ var mapInteractor = function mapInteractor(args) {
|
|
|
21384
21454
|
preventDefault: function preventDefault() {},
|
|
21385
21455
|
simulated: true
|
|
21386
21456
|
};
|
|
21387
|
-
m_keyHandler.trigger(keys);
|
|
21457
|
+
m_keyHandler.trigger(keys, options.event);
|
|
21388
21458
|
return;
|
|
21389
21459
|
}
|
|
21390
21460
|
|
|
@@ -26603,6 +26673,8 @@ module.exports = quadFeature;
|
|
|
26603
26673
|
|
|
26604
26674
|
var $ = __webpack_require__(5638);
|
|
26605
26675
|
|
|
26676
|
+
var geo_action = __webpack_require__(7839);
|
|
26677
|
+
|
|
26606
26678
|
var widgets = {
|
|
26607
26679
|
dom: {}
|
|
26608
26680
|
};
|
|
@@ -27061,6 +27133,7 @@ util.registerAnnotation = function (name, func, features) {
|
|
|
27061
27133
|
func: func,
|
|
27062
27134
|
features: features || {}
|
|
27063
27135
|
};
|
|
27136
|
+
geo_action['annotation_' + name] = 'geo_annotation_' + name;
|
|
27064
27137
|
return old;
|
|
27065
27138
|
};
|
|
27066
27139
|
/**
|
|
@@ -27577,7 +27650,7 @@ module.exports = sceneObject;
|
|
|
27577
27650
|
* @constant
|
|
27578
27651
|
* @type {string}
|
|
27579
27652
|
*/
|
|
27580
|
-
module.exports = "
|
|
27653
|
+
module.exports = "f6ebaf74f3f8b523860d8b780cbd38782bdd81ca";
|
|
27581
27654
|
|
|
27582
27655
|
/***/ }),
|
|
27583
27656
|
|
|
@@ -40171,6 +40244,7 @@ function generateCorrespondence(poly1, poly2, newpoly, results) {
|
|
|
40171
40244
|
results[ekey] = Array(poly.length);
|
|
40172
40245
|
poly.forEach(function (p, idx) {
|
|
40173
40246
|
var found = {};
|
|
40247
|
+
var missed = 0;
|
|
40174
40248
|
p.forEach(function (h) {
|
|
40175
40249
|
return h.forEach(function (pt) {
|
|
40176
40250
|
var key = '_' + pt[0] + '_' + pt[1];
|
|
@@ -40179,11 +40253,13 @@ function generateCorrespondence(poly1, poly2, newpoly, results) {
|
|
|
40179
40253
|
pts[key].forEach(function (val) {
|
|
40180
40254
|
found[val] = (found[val] || 0) + 1;
|
|
40181
40255
|
});
|
|
40256
|
+
} else {
|
|
40257
|
+
missed += 1;
|
|
40182
40258
|
}
|
|
40183
40259
|
});
|
|
40184
40260
|
});
|
|
40185
40261
|
Object.keys(found).forEach(function (nidx) {
|
|
40186
|
-
if (found[nidx] === counts[+nidx]) {
|
|
40262
|
+
if (found[nidx] === counts[+nidx] && !missed && p.length === newpoly[+nidx].length) {
|
|
40187
40263
|
if (!results[ekey][idx]) {
|
|
40188
40264
|
results[ekey][idx] = [];
|
|
40189
40265
|
}
|
|
@@ -40699,7 +40775,7 @@ module.exports = vectorFeature;
|
|
|
40699
40775
|
* @constant
|
|
40700
40776
|
* @type {string}
|
|
40701
40777
|
*/
|
|
40702
|
-
module.exports = "1.9.
|
|
40778
|
+
module.exports = "1.9.4";
|
|
40703
40779
|
|
|
40704
40780
|
/***/ }),
|
|
40705
40781
|
|