geojs 1.14.13 → 1.14.14
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/.github/workflows/main.yml +3 -3
- package/README.md +1 -1
- package/geo.js +16 -3
- package/geo.lean.js +16 -3
- package/geo.lean.min.js +3 -3
- package/geo.min.js +3 -3
- package/package.json +1 -1
- package/src/annotationLayer.js +4 -2
- package/src/event.js +4 -0
package/package.json
CHANGED
package/src/annotationLayer.js
CHANGED
|
@@ -707,9 +707,10 @@ var annotationLayer = function (arg) {
|
|
|
707
707
|
} else {
|
|
708
708
|
m_keyHandler.unbind('esc');
|
|
709
709
|
}
|
|
710
|
-
let oldState;
|
|
710
|
+
let oldState, oldCoordinates;
|
|
711
711
|
if (m_this.currentAnnotation) {
|
|
712
712
|
oldState = m_this.currentAnnotation.state();
|
|
713
|
+
oldCoordinates = m_this.currentAnnotation._copyOfCoordinates();
|
|
713
714
|
switch (m_this.currentAnnotation.state()) {
|
|
714
715
|
case geo_annotation.state.create:
|
|
715
716
|
m_this.removeAnnotation(m_this.currentAnnotation);
|
|
@@ -757,8 +758,9 @@ var annotationLayer = function (arg) {
|
|
|
757
758
|
m_this.map().interactor().addAction(action);
|
|
758
759
|
});
|
|
759
760
|
}
|
|
761
|
+
console.log({mode: m_mode, oldMode, oldState, oldCoordinates, reason});
|
|
760
762
|
m_this.geoTrigger(geo_event.annotation.mode, {
|
|
761
|
-
mode: m_mode, oldMode
|
|
763
|
+
mode: m_mode, oldMode, oldState, oldCoordinates, reason});
|
|
762
764
|
if (oldMode === m_this.modes.edit || oldMode === m_this.modes.cursor) {
|
|
763
765
|
m_this.modified();
|
|
764
766
|
}
|
package/src/event.js
CHANGED
|
@@ -753,6 +753,10 @@ geo_event.annotation.state = 'geo_annotation_state';
|
|
|
753
753
|
* @property {string?} oldState If there was an active annotation before the
|
|
754
754
|
* mode change, this is the annotation state before the change. This is
|
|
755
755
|
* one of the values from {@link geo.annotation.state}.
|
|
756
|
+
* @property {string?} oldCoordinates If there was an active annotation before
|
|
757
|
+
* the mode change, these are the annotation's coordinates before the
|
|
758
|
+
* change. This will be an empty list if an annotation in create state
|
|
759
|
+
* had not been started and a non-empty list if it is partially created.
|
|
756
760
|
* @property {string?} reason An optional string that was passed to the mode
|
|
757
761
|
* change method.
|
|
758
762
|
*/
|