@mint-ui/map 0.5.8-beta → 0.5.9-beta
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/components/mint-map/core/wrapper/MapMarkerWrapper.js +12 -2
- package/dist/components/mint-map/google/GoogleMintMapController.js +9 -1
- package/dist/components/mint-map/kakao/KakaoMintMapController.d.ts +0 -1
- package/dist/components/mint-map/kakao/KakaoMintMapController.js +9 -2
- package/dist/components/mint-map/naver/NaverMintMapController.d.ts +0 -1
- package/dist/components/mint-map/naver/NaverMintMapController.js +5 -14
- package/dist/index.es.js +35 -19
- package/dist/index.umd.js +35 -19
- package/package.json +1 -1
|
@@ -70,13 +70,18 @@ function MapMarkerWrapper(_a) {
|
|
|
70
70
|
|
|
71
71
|
var start = MarkerMovingHook.useMarkerMoving(movingState)[0]; //event handlers
|
|
72
72
|
|
|
73
|
+
var onMousedownHandler = function (e) {
|
|
74
|
+
// console.log('onMousedownHandler setMapDragged', false);
|
|
75
|
+
// 맵 드래그 여부 초기화
|
|
76
|
+
controller.setMapDragged(false);
|
|
77
|
+
};
|
|
78
|
+
|
|
73
79
|
var onClickHandler = function (e) {
|
|
74
80
|
var _a;
|
|
75
81
|
|
|
76
|
-
var marker = markerRef.current;
|
|
82
|
+
var marker = markerRef.current;
|
|
77
83
|
|
|
78
84
|
if (marker) {
|
|
79
|
-
controller.setMapDragged(false);
|
|
80
85
|
var clickHandler = (_a = options === null || options === void 0 ? void 0 : options.event) === null || _a === void 0 ? void 0 : _a.get('click');
|
|
81
86
|
var next = true;
|
|
82
87
|
|
|
@@ -116,9 +121,14 @@ function MapMarkerWrapper(_a) {
|
|
|
116
121
|
divElement.style.flexDirection = 'column';
|
|
117
122
|
divElement.style.pointerEvents = disablePointerEvent ? 'none' : '';
|
|
118
123
|
divElement.addEventListener('click', onClickHandler);
|
|
124
|
+
divElement.addEventListener('mousedown', onMousedownHandler, {
|
|
125
|
+
capture: true
|
|
126
|
+
}); //드래그 여부 초기화를 먼저 수행하기 위해 capture : true 처리
|
|
127
|
+
|
|
119
128
|
divElement.addEventListener('mouseover', onMouseOverHandler);
|
|
120
129
|
return function () {
|
|
121
130
|
divElement.removeEventListener('click', onClickHandler);
|
|
131
|
+
divElement.removeEventListener('mousedown', onMousedownHandler);
|
|
122
132
|
divElement.removeEventListener('mouseover', onMouseOverHandler);
|
|
123
133
|
|
|
124
134
|
if (markerRef.current) {
|
|
@@ -340,7 +340,7 @@ function (_super) {
|
|
|
340
340
|
};
|
|
341
341
|
|
|
342
342
|
GoogleMintMapController.prototype.setMapDragged = function (value) {
|
|
343
|
-
this.dragged =
|
|
343
|
+
this.dragged = value;
|
|
344
344
|
};
|
|
345
345
|
|
|
346
346
|
GoogleMintMapController.prototype.checkLoaded = function () {
|
|
@@ -476,6 +476,14 @@ function (_super) {
|
|
|
476
476
|
});
|
|
477
477
|
this.map = map; //@ts-ignore
|
|
478
478
|
|
|
479
|
+
map.addListener('mousedown', function () {
|
|
480
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
481
|
+
}); //@ts-ignore
|
|
482
|
+
|
|
483
|
+
map.addListener('dragstart', function () {
|
|
484
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
485
|
+
}); //@ts-ignore
|
|
486
|
+
|
|
479
487
|
map.addListener('idle', function () {
|
|
480
488
|
//onBoundsChanged event
|
|
481
489
|
_this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
@@ -31,7 +31,6 @@ export declare class KakaoMintMapController extends MintMapController {
|
|
|
31
31
|
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
32
32
|
markerToTheTop(marker: Marker): void;
|
|
33
33
|
clearDrawable(drawable: Drawable): boolean;
|
|
34
|
-
private dragStartPoint;
|
|
35
34
|
private dragged;
|
|
36
35
|
isMapDragged(): boolean;
|
|
37
36
|
setMapDragged(value: boolean): void;
|
|
@@ -29,7 +29,6 @@ function (_super) {
|
|
|
29
29
|
_this.polylineEvents = ['mouseover', 'mouseout'];
|
|
30
30
|
_this.polygonEvents = ['mouseover', 'mouseout'];
|
|
31
31
|
_this.markerEvents = ['click', 'mouseover', 'mouseout'];
|
|
32
|
-
_this.dragStartPoint = [0, 0];
|
|
33
32
|
_this.dragged = false;
|
|
34
33
|
_this.eventMap = new Map(); //kakao only 이벤트이름 재정의 zoom_start
|
|
35
34
|
|
|
@@ -361,7 +360,7 @@ function (_super) {
|
|
|
361
360
|
};
|
|
362
361
|
|
|
363
362
|
KakaoMintMapController.prototype.setMapDragged = function (value) {
|
|
364
|
-
this.dragged =
|
|
363
|
+
this.dragged = value;
|
|
365
364
|
};
|
|
366
365
|
|
|
367
366
|
KakaoMintMapController.prototype.checkLoaded = function () {
|
|
@@ -501,6 +500,14 @@ function (_super) {
|
|
|
501
500
|
// })
|
|
502
501
|
//@ts-ignore
|
|
503
502
|
|
|
503
|
+
map.addListener('mousedown', function () {
|
|
504
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
505
|
+
}); //@ts-ignore
|
|
506
|
+
|
|
507
|
+
map.addListener('dragstart', function () {
|
|
508
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
509
|
+
}); //@ts-ignore
|
|
510
|
+
|
|
504
511
|
map.addListener('idle', function (e) {
|
|
505
512
|
//onBoundsChanged event
|
|
506
513
|
_this.map && _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
@@ -30,7 +30,6 @@ export declare class NaverMintMapController extends MintMapController {
|
|
|
30
30
|
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
31
31
|
markerToTheTop(marker: Marker): void;
|
|
32
32
|
clearDrawable(drawable: Drawable): boolean;
|
|
33
|
-
private dragStartPoint;
|
|
34
33
|
private dragged;
|
|
35
34
|
isMapDragged(): boolean;
|
|
36
35
|
setMapDragged(value: boolean): void;
|
|
@@ -29,7 +29,6 @@ function (_super) {
|
|
|
29
29
|
_this.polylineEvents = ['mouseover', 'mouseout'];
|
|
30
30
|
_this.polygonEvents = ['mouseover', 'mouseout'];
|
|
31
31
|
_this.markerEvents = ['click', 'mouseover', 'mouseout'];
|
|
32
|
-
_this.dragStartPoint = [0, 0];
|
|
33
32
|
_this.dragged = false;
|
|
34
33
|
_this.eventMap = new Map(); //contextmenu 는 지원하지 않지만 호환성을 위해 rightclick 으로 대체
|
|
35
34
|
|
|
@@ -363,7 +362,7 @@ function (_super) {
|
|
|
363
362
|
};
|
|
364
363
|
|
|
365
364
|
NaverMintMapController.prototype.setMapDragged = function (value) {
|
|
366
|
-
this.dragged =
|
|
365
|
+
this.dragged = value;
|
|
367
366
|
};
|
|
368
367
|
|
|
369
368
|
NaverMintMapController.prototype.checkLoaded = function () {
|
|
@@ -518,20 +517,12 @@ function (_super) {
|
|
|
518
517
|
map = new naver.maps.Map(divElement, options);
|
|
519
518
|
this.map = map; //@ts-ignore
|
|
520
519
|
|
|
521
|
-
map.addListener('
|
|
522
|
-
//console.log('map
|
|
523
|
-
_this.dragStartPoint[0] = e.domEvent.clientX;
|
|
524
|
-
_this.dragStartPoint[1] = e.domEvent.clientY;
|
|
520
|
+
map.addListener('mousedown', function () {
|
|
521
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
525
522
|
}); //@ts-ignore
|
|
526
523
|
|
|
527
|
-
map.addListener('
|
|
528
|
-
//console.log('map
|
|
529
|
-
if (_this.dragStartPoint[0] === e.domEvent.clientX && _this.dragStartPoint[1] === e.domEvent.clientY) {
|
|
530
|
-
_this.dragged = false;
|
|
531
|
-
} else {
|
|
532
|
-
_this.dragged = true;
|
|
533
|
-
} //console.log('map dragend', this.dragged)
|
|
534
|
-
|
|
524
|
+
map.addListener('dragstart', function () {
|
|
525
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
535
526
|
}); //@ts-ignore
|
|
536
527
|
|
|
537
528
|
map.addListener('idle', function (e) {
|
package/dist/index.es.js
CHANGED
|
@@ -1469,7 +1469,6 @@ function (_super) {
|
|
|
1469
1469
|
_this.polylineEvents = ['mouseover', 'mouseout'];
|
|
1470
1470
|
_this.polygonEvents = ['mouseover', 'mouseout'];
|
|
1471
1471
|
_this.markerEvents = ['click', 'mouseover', 'mouseout'];
|
|
1472
|
-
_this.dragStartPoint = [0, 0];
|
|
1473
1472
|
_this.dragged = false;
|
|
1474
1473
|
_this.eventMap = new Map(); //contextmenu 는 지원하지 않지만 호환성을 위해 rightclick 으로 대체
|
|
1475
1474
|
|
|
@@ -1803,7 +1802,7 @@ function (_super) {
|
|
|
1803
1802
|
};
|
|
1804
1803
|
|
|
1805
1804
|
NaverMintMapController.prototype.setMapDragged = function (value) {
|
|
1806
|
-
this.dragged =
|
|
1805
|
+
this.dragged = value;
|
|
1807
1806
|
};
|
|
1808
1807
|
|
|
1809
1808
|
NaverMintMapController.prototype.checkLoaded = function () {
|
|
@@ -1958,20 +1957,12 @@ function (_super) {
|
|
|
1958
1957
|
map = new naver.maps.Map(divElement, options);
|
|
1959
1958
|
this.map = map; //@ts-ignore
|
|
1960
1959
|
|
|
1961
|
-
map.addListener('
|
|
1962
|
-
//console.log('map
|
|
1963
|
-
_this.dragStartPoint[0] = e.domEvent.clientX;
|
|
1964
|
-
_this.dragStartPoint[1] = e.domEvent.clientY;
|
|
1960
|
+
map.addListener('mousedown', function () {
|
|
1961
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
1965
1962
|
}); //@ts-ignore
|
|
1966
1963
|
|
|
1967
|
-
map.addListener('
|
|
1968
|
-
//console.log('map
|
|
1969
|
-
if (_this.dragStartPoint[0] === e.domEvent.clientX && _this.dragStartPoint[1] === e.domEvent.clientY) {
|
|
1970
|
-
_this.dragged = false;
|
|
1971
|
-
} else {
|
|
1972
|
-
_this.dragged = true;
|
|
1973
|
-
} //console.log('map dragend', this.dragged)
|
|
1974
|
-
|
|
1964
|
+
map.addListener('dragstart', function () {
|
|
1965
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
1975
1966
|
}); //@ts-ignore
|
|
1976
1967
|
|
|
1977
1968
|
map.addListener('idle', function (e) {
|
|
@@ -2514,7 +2505,7 @@ function (_super) {
|
|
|
2514
2505
|
};
|
|
2515
2506
|
|
|
2516
2507
|
GoogleMintMapController.prototype.setMapDragged = function (value) {
|
|
2517
|
-
this.dragged =
|
|
2508
|
+
this.dragged = value;
|
|
2518
2509
|
};
|
|
2519
2510
|
|
|
2520
2511
|
GoogleMintMapController.prototype.checkLoaded = function () {
|
|
@@ -2650,6 +2641,14 @@ function (_super) {
|
|
|
2650
2641
|
});
|
|
2651
2642
|
this.map = map; //@ts-ignore
|
|
2652
2643
|
|
|
2644
|
+
map.addListener('mousedown', function () {
|
|
2645
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
2646
|
+
}); //@ts-ignore
|
|
2647
|
+
|
|
2648
|
+
map.addListener('dragstart', function () {
|
|
2649
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
2650
|
+
}); //@ts-ignore
|
|
2651
|
+
|
|
2653
2652
|
map.addListener('idle', function () {
|
|
2654
2653
|
//onBoundsChanged event
|
|
2655
2654
|
_this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
@@ -2878,7 +2877,6 @@ function (_super) {
|
|
|
2878
2877
|
_this.polylineEvents = ['mouseover', 'mouseout'];
|
|
2879
2878
|
_this.polygonEvents = ['mouseover', 'mouseout'];
|
|
2880
2879
|
_this.markerEvents = ['click', 'mouseover', 'mouseout'];
|
|
2881
|
-
_this.dragStartPoint = [0, 0];
|
|
2882
2880
|
_this.dragged = false;
|
|
2883
2881
|
_this.eventMap = new Map(); //kakao only 이벤트이름 재정의 zoom_start
|
|
2884
2882
|
|
|
@@ -3210,7 +3208,7 @@ function (_super) {
|
|
|
3210
3208
|
};
|
|
3211
3209
|
|
|
3212
3210
|
KakaoMintMapController.prototype.setMapDragged = function (value) {
|
|
3213
|
-
this.dragged =
|
|
3211
|
+
this.dragged = value;
|
|
3214
3212
|
};
|
|
3215
3213
|
|
|
3216
3214
|
KakaoMintMapController.prototype.checkLoaded = function () {
|
|
@@ -3350,6 +3348,14 @@ function (_super) {
|
|
|
3350
3348
|
// })
|
|
3351
3349
|
//@ts-ignore
|
|
3352
3350
|
|
|
3351
|
+
map.addListener('mousedown', function () {
|
|
3352
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
3353
|
+
}); //@ts-ignore
|
|
3354
|
+
|
|
3355
|
+
map.addListener('dragstart', function () {
|
|
3356
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
3357
|
+
}); //@ts-ignore
|
|
3358
|
+
|
|
3353
3359
|
map.addListener('idle', function (e) {
|
|
3354
3360
|
//onBoundsChanged event
|
|
3355
3361
|
_this.map && _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
@@ -4211,13 +4217,18 @@ function MapMarkerWrapper(_a) {
|
|
|
4211
4217
|
|
|
4212
4218
|
var start = useMarkerMoving(movingState)[0]; //event handlers
|
|
4213
4219
|
|
|
4220
|
+
var onMousedownHandler = function (e) {
|
|
4221
|
+
// console.log('onMousedownHandler setMapDragged', false);
|
|
4222
|
+
// 맵 드래그 여부 초기화
|
|
4223
|
+
controller.setMapDragged(false);
|
|
4224
|
+
};
|
|
4225
|
+
|
|
4214
4226
|
var onClickHandler = function (e) {
|
|
4215
4227
|
var _a;
|
|
4216
4228
|
|
|
4217
|
-
var marker = markerRef.current;
|
|
4229
|
+
var marker = markerRef.current;
|
|
4218
4230
|
|
|
4219
4231
|
if (marker) {
|
|
4220
|
-
controller.setMapDragged(false);
|
|
4221
4232
|
var clickHandler = (_a = options === null || options === void 0 ? void 0 : options.event) === null || _a === void 0 ? void 0 : _a.get('click');
|
|
4222
4233
|
var next = true;
|
|
4223
4234
|
|
|
@@ -4257,9 +4268,14 @@ function MapMarkerWrapper(_a) {
|
|
|
4257
4268
|
divElement.style.flexDirection = 'column';
|
|
4258
4269
|
divElement.style.pointerEvents = disablePointerEvent ? 'none' : '';
|
|
4259
4270
|
divElement.addEventListener('click', onClickHandler);
|
|
4271
|
+
divElement.addEventListener('mousedown', onMousedownHandler, {
|
|
4272
|
+
capture: true
|
|
4273
|
+
}); //드래그 여부 초기화를 먼저 수행하기 위해 capture : true 처리
|
|
4274
|
+
|
|
4260
4275
|
divElement.addEventListener('mouseover', onMouseOverHandler);
|
|
4261
4276
|
return function () {
|
|
4262
4277
|
divElement.removeEventListener('click', onClickHandler);
|
|
4278
|
+
divElement.removeEventListener('mousedown', onMousedownHandler);
|
|
4263
4279
|
divElement.removeEventListener('mouseover', onMouseOverHandler);
|
|
4264
4280
|
|
|
4265
4281
|
if (markerRef.current) {
|
package/dist/index.umd.js
CHANGED
|
@@ -1473,7 +1473,6 @@
|
|
|
1473
1473
|
_this.polylineEvents = ['mouseover', 'mouseout'];
|
|
1474
1474
|
_this.polygonEvents = ['mouseover', 'mouseout'];
|
|
1475
1475
|
_this.markerEvents = ['click', 'mouseover', 'mouseout'];
|
|
1476
|
-
_this.dragStartPoint = [0, 0];
|
|
1477
1476
|
_this.dragged = false;
|
|
1478
1477
|
_this.eventMap = new Map(); //contextmenu 는 지원하지 않지만 호환성을 위해 rightclick 으로 대체
|
|
1479
1478
|
|
|
@@ -1807,7 +1806,7 @@
|
|
|
1807
1806
|
};
|
|
1808
1807
|
|
|
1809
1808
|
NaverMintMapController.prototype.setMapDragged = function (value) {
|
|
1810
|
-
this.dragged =
|
|
1809
|
+
this.dragged = value;
|
|
1811
1810
|
};
|
|
1812
1811
|
|
|
1813
1812
|
NaverMintMapController.prototype.checkLoaded = function () {
|
|
@@ -1962,20 +1961,12 @@
|
|
|
1962
1961
|
map = new naver.maps.Map(divElement, options);
|
|
1963
1962
|
this.map = map; //@ts-ignore
|
|
1964
1963
|
|
|
1965
|
-
map.addListener('
|
|
1966
|
-
//console.log('map
|
|
1967
|
-
_this.dragStartPoint[0] = e.domEvent.clientX;
|
|
1968
|
-
_this.dragStartPoint[1] = e.domEvent.clientY;
|
|
1964
|
+
map.addListener('mousedown', function () {
|
|
1965
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
1969
1966
|
}); //@ts-ignore
|
|
1970
1967
|
|
|
1971
|
-
map.addListener('
|
|
1972
|
-
//console.log('map
|
|
1973
|
-
if (_this.dragStartPoint[0] === e.domEvent.clientX && _this.dragStartPoint[1] === e.domEvent.clientY) {
|
|
1974
|
-
_this.dragged = false;
|
|
1975
|
-
} else {
|
|
1976
|
-
_this.dragged = true;
|
|
1977
|
-
} //console.log('map dragend', this.dragged)
|
|
1978
|
-
|
|
1968
|
+
map.addListener('dragstart', function () {
|
|
1969
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
1979
1970
|
}); //@ts-ignore
|
|
1980
1971
|
|
|
1981
1972
|
map.addListener('idle', function (e) {
|
|
@@ -2518,7 +2509,7 @@
|
|
|
2518
2509
|
};
|
|
2519
2510
|
|
|
2520
2511
|
GoogleMintMapController.prototype.setMapDragged = function (value) {
|
|
2521
|
-
this.dragged =
|
|
2512
|
+
this.dragged = value;
|
|
2522
2513
|
};
|
|
2523
2514
|
|
|
2524
2515
|
GoogleMintMapController.prototype.checkLoaded = function () {
|
|
@@ -2654,6 +2645,14 @@
|
|
|
2654
2645
|
});
|
|
2655
2646
|
this.map = map; //@ts-ignore
|
|
2656
2647
|
|
|
2648
|
+
map.addListener('mousedown', function () {
|
|
2649
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
2650
|
+
}); //@ts-ignore
|
|
2651
|
+
|
|
2652
|
+
map.addListener('dragstart', function () {
|
|
2653
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
2654
|
+
}); //@ts-ignore
|
|
2655
|
+
|
|
2657
2656
|
map.addListener('idle', function () {
|
|
2658
2657
|
//onBoundsChanged event
|
|
2659
2658
|
_this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
@@ -2882,7 +2881,6 @@
|
|
|
2882
2881
|
_this.polylineEvents = ['mouseover', 'mouseout'];
|
|
2883
2882
|
_this.polygonEvents = ['mouseover', 'mouseout'];
|
|
2884
2883
|
_this.markerEvents = ['click', 'mouseover', 'mouseout'];
|
|
2885
|
-
_this.dragStartPoint = [0, 0];
|
|
2886
2884
|
_this.dragged = false;
|
|
2887
2885
|
_this.eventMap = new Map(); //kakao only 이벤트이름 재정의 zoom_start
|
|
2888
2886
|
|
|
@@ -3214,7 +3212,7 @@
|
|
|
3214
3212
|
};
|
|
3215
3213
|
|
|
3216
3214
|
KakaoMintMapController.prototype.setMapDragged = function (value) {
|
|
3217
|
-
this.dragged =
|
|
3215
|
+
this.dragged = value;
|
|
3218
3216
|
};
|
|
3219
3217
|
|
|
3220
3218
|
KakaoMintMapController.prototype.checkLoaded = function () {
|
|
@@ -3354,6 +3352,14 @@
|
|
|
3354
3352
|
// })
|
|
3355
3353
|
//@ts-ignore
|
|
3356
3354
|
|
|
3355
|
+
map.addListener('mousedown', function () {
|
|
3356
|
+
_this.dragged = false; // console.log('map mousedown / dragged => ', this.dragged);
|
|
3357
|
+
}); //@ts-ignore
|
|
3358
|
+
|
|
3359
|
+
map.addListener('dragstart', function () {
|
|
3360
|
+
_this.dragged = true; // console.log('map dragstart / dragged => ', this.dragged);
|
|
3361
|
+
}); //@ts-ignore
|
|
3362
|
+
|
|
3357
3363
|
map.addListener('idle', function (e) {
|
|
3358
3364
|
//onBoundsChanged event
|
|
3359
3365
|
_this.map && _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
|
|
@@ -4215,13 +4221,18 @@
|
|
|
4215
4221
|
|
|
4216
4222
|
var start = useMarkerMoving(movingState)[0]; //event handlers
|
|
4217
4223
|
|
|
4224
|
+
var onMousedownHandler = function (e) {
|
|
4225
|
+
// console.log('onMousedownHandler setMapDragged', false);
|
|
4226
|
+
// 맵 드래그 여부 초기화
|
|
4227
|
+
controller.setMapDragged(false);
|
|
4228
|
+
};
|
|
4229
|
+
|
|
4218
4230
|
var onClickHandler = function (e) {
|
|
4219
4231
|
var _a;
|
|
4220
4232
|
|
|
4221
|
-
var marker = markerRef.current;
|
|
4233
|
+
var marker = markerRef.current;
|
|
4222
4234
|
|
|
4223
4235
|
if (marker) {
|
|
4224
|
-
controller.setMapDragged(false);
|
|
4225
4236
|
var clickHandler = (_a = options === null || options === void 0 ? void 0 : options.event) === null || _a === void 0 ? void 0 : _a.get('click');
|
|
4226
4237
|
var next = true;
|
|
4227
4238
|
|
|
@@ -4261,9 +4272,14 @@
|
|
|
4261
4272
|
divElement.style.flexDirection = 'column';
|
|
4262
4273
|
divElement.style.pointerEvents = disablePointerEvent ? 'none' : '';
|
|
4263
4274
|
divElement.addEventListener('click', onClickHandler);
|
|
4275
|
+
divElement.addEventListener('mousedown', onMousedownHandler, {
|
|
4276
|
+
capture: true
|
|
4277
|
+
}); //드래그 여부 초기화를 먼저 수행하기 위해 capture : true 처리
|
|
4278
|
+
|
|
4264
4279
|
divElement.addEventListener('mouseover', onMouseOverHandler);
|
|
4265
4280
|
return function () {
|
|
4266
4281
|
divElement.removeEventListener('click', onClickHandler);
|
|
4282
|
+
divElement.removeEventListener('mousedown', onMousedownHandler);
|
|
4267
4283
|
divElement.removeEventListener('mouseover', onMouseOverHandler);
|
|
4268
4284
|
|
|
4269
4285
|
if (markerRef.current) {
|