orcasvn-react-diagrams 0.1.22 → 0.1.23

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/dist/cjs/index.js CHANGED
@@ -9194,7 +9194,12 @@ var Element = function (props) {
9194
9194
  var handleSelectedPort = function (port, e) {
9195
9195
  e.stopPropagation();
9196
9196
  setSelectedPort(port);
9197
- _paperEventEmitterContext.emitPortSelected(port, id);
9197
+ if (props.ports) {
9198
+ var orgPort = props.ports.find(function (p) { return p.id === port.id; });
9199
+ if (orgPort) {
9200
+ _paperEventEmitterContext.emitPortSelected(orgPort, id);
9201
+ }
9202
+ }
9198
9203
  };
9199
9204
  //From one point find another point on the line segment so that the distance between the two points is the shortest.
9200
9205
  var findNearestPointOnSegment = function (position, linePoints) {
package/dist/esm/index.js CHANGED
@@ -9190,7 +9190,12 @@ var Element = function (props) {
9190
9190
  var handleSelectedPort = function (port, e) {
9191
9191
  e.stopPropagation();
9192
9192
  setSelectedPort(port);
9193
- _paperEventEmitterContext.emitPortSelected(port, id);
9193
+ if (props.ports) {
9194
+ var orgPort = props.ports.find(function (p) { return p.id === port.id; });
9195
+ if (orgPort) {
9196
+ _paperEventEmitterContext.emitPortSelected(orgPort, id);
9197
+ }
9198
+ }
9194
9199
  };
9195
9200
  //From one point find another point on the line segment so that the distance between the two points is the shortest.
9196
9201
  var findNearestPointOnSegment = function (position, linePoints) {