| 587 | } |
| 588 | |
| 589 | private _updateMapSelectHandler( |
| 590 | mapOrGeoModel: MapOrGeoModel, |
| 591 | regionsGroup: RegionsGroup, |
| 592 | api: ExtensionAPI, |
| 593 | fromView: MapView | GeoView |
| 594 | ): void { |
| 595 | const mapDraw = this; |
| 596 | |
| 597 | regionsGroup.off('mousedown'); |
| 598 | regionsGroup.off('click'); |
| 599 | |
| 600 | if (mapOrGeoModel.get('selectedMode')) { |
| 601 | |
| 602 | regionsGroup.on('mousedown', function () { |
| 603 | mapDraw._mouseDownFlag = true; |
| 604 | }); |
| 605 | |
| 606 | regionsGroup.on('click', function (e) { |
| 607 | if (!mapDraw._mouseDownFlag) { |
| 608 | return; |
| 609 | } |
| 610 | mapDraw._mouseDownFlag = false; |
| 611 | }); |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | }; |
| 616 | |