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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geojs",
3
- "version": "1.14.13",
3
+ "version": "1.14.14",
4
4
  "description": "JavaScript Geo Visualization and Analysis Library",
5
5
  "homepage": "https://github.com/OpenGeoscience/geojs",
6
6
  "license": "Apache-2.0",
@@ -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: oldMode, oldState: oldState, reason: reason});
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
  */