@mint-ui/map 1.2.3-test.1 → 1.2.4
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/.claude/settings.local.json +6 -18
- package/dist/components/mint-map/core/MintMapCore.js +1 -2
- package/dist/components/mint-map/core/advanced/CanvasPolygonLayer/CanvasPolygonLayer.js +15 -2
- package/dist/components/mint-map/core/advanced/CanvasPolygonLayer/types.d.ts +4 -0
- package/dist/components/mint-map/core/advanced/shared/types.js +4 -4
- package/dist/components/mint-map/core/advanced/shared/utils.js +2 -2
- package/dist/components/mint-map/google/GoogleMintMapController.js +1 -0
- package/dist/components/mint-map/kakao/KakaoMintMapController.js +1 -0
- package/dist/components/mint-map/naver/NaverMintMapController.js +1 -0
- package/dist/index.es.js +17 -4
- package/dist/index.umd.js +17 -4
- package/mint-ui-map-1.2.4.tgz +0 -0
- package/package.json +1 -1
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"Bash(npm run storybook:*)",
|
|
11
|
-
"Read(//var/folders/7t/vchtbctx3m788mhcq9fn2x540000gn/T/TemporaryItems/NSIRD_screencaptureui_HMhrPV/**)",
|
|
12
|
-
"Bash(gh pr view:*)",
|
|
13
|
-
"Bash(brew list:*)",
|
|
14
|
-
"WebFetch(domain:github.com)",
|
|
15
|
-
"Bash(brew install:*)",
|
|
16
|
-
"Bash(gh auth status:*)",
|
|
17
|
-
"Bash(git fetch:*)",
|
|
18
|
-
"Bash(git grep:*)"
|
|
19
|
-
],
|
|
20
|
-
"deny": [],
|
|
21
|
-
"ask": []
|
|
4
|
+
"Bash(npx tsc:*)",
|
|
5
|
+
"Bash(./node_modules/.bin/tsc --noEmit --pretty)",
|
|
6
|
+
"Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(json.dumps\\(d.get\\('scripts',{}\\), indent=2\\)\\)\")",
|
|
7
|
+
"Bash(npm run:*)",
|
|
8
|
+
"Bash(npm install:*)"
|
|
9
|
+
]
|
|
22
10
|
}
|
|
23
11
|
}
|
|
@@ -11,8 +11,7 @@ var MintMapCore_module = require('./MintMapCore.module.scss.js');
|
|
|
11
11
|
var context = require('./advanced/shared/context.js');
|
|
12
12
|
require('./advanced/shared/performance.js');
|
|
13
13
|
require('./advanced/shared/types.js');
|
|
14
|
-
require('
|
|
15
|
-
require('../types/MapEventTypes.js');
|
|
14
|
+
require('./advanced/shared/utils.js');
|
|
16
15
|
|
|
17
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
17
|
|
|
@@ -31,6 +31,8 @@ var CanvasPolygonLayer = function (props) {
|
|
|
31
31
|
_b = props.cullingMargin,
|
|
32
32
|
cullingMargin = _b === void 0 ? performance.DEFAULT_CULLING_MARGIN : _b,
|
|
33
33
|
onClick = props.onClick,
|
|
34
|
+
onMouseOver = props.onMouseOver,
|
|
35
|
+
onMouseOut = props.onMouseOut,
|
|
34
36
|
onOptimizationDataUpdate = props.onOptimizationDataUpdate,
|
|
35
37
|
externalSelectedItems = props.selectedItems,
|
|
36
38
|
externalSelectedItem = props.selectedItem,
|
|
@@ -38,7 +40,7 @@ var CanvasPolygonLayer = function (props) {
|
|
|
38
40
|
disableInteraction = _c === void 0 ? false : _c,
|
|
39
41
|
_d = props.spatialGridCellSize,
|
|
40
42
|
spatialGridCellSize = _d === void 0 ? performance.SPATIAL_GRID_CELL_SIZE : _d,
|
|
41
|
-
options = tslib.__rest(props, ["data", "enableMultiSelect", "cullingMargin", "onClick", "onOptimizationDataUpdate", "selectedItems", "selectedItem", "disableInteraction", "spatialGridCellSize"]); // customStyle은 다른 방식과 함께 사용 가능
|
|
43
|
+
options = tslib.__rest(props, ["data", "enableMultiSelect", "cullingMargin", "onClick", "onMouseOver", "onMouseOut", "onOptimizationDataUpdate", "selectedItems", "selectedItem", "disableInteraction", "spatialGridCellSize"]); // customStyle은 다른 방식과 함께 사용 가능
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
var hasCustomStyle = 'customStyle' in props && props.customStyle !== undefined;
|
|
@@ -357,7 +359,17 @@ var CanvasPolygonLayer = function (props) {
|
|
|
357
359
|
return;
|
|
358
360
|
}
|
|
359
361
|
|
|
360
|
-
hoveredItemRef.current
|
|
362
|
+
var prevHovered = hoveredItemRef.current;
|
|
363
|
+
hoveredItemRef.current = hoveredData; // onMouseOut: 이전 hover 항목에서 벗어남
|
|
364
|
+
|
|
365
|
+
if (prevHovered && prevHovered !== hoveredData) {
|
|
366
|
+
onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(prevHovered);
|
|
367
|
+
} // onMouseOver: 새로운 항목에 hover
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
if (hoveredData && hoveredData !== prevHovered) {
|
|
371
|
+
onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver(hoveredData);
|
|
372
|
+
}
|
|
361
373
|
|
|
362
374
|
if (draggingRef.current) {
|
|
363
375
|
controller.setMapCursor('grabbing');
|
|
@@ -431,6 +443,7 @@ var CanvasPolygonLayer = function (props) {
|
|
|
431
443
|
var prevHovered = hoveredItemRef.current;
|
|
432
444
|
if (!prevHovered) return;
|
|
433
445
|
hoveredItemRef.current = null;
|
|
446
|
+
onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(prevHovered);
|
|
434
447
|
controller.setMapCursor('grab');
|
|
435
448
|
doRenderEvent();
|
|
436
449
|
}; // DOM 초기화
|
|
@@ -111,6 +111,10 @@ export interface CanvasPolygonLayerBaseProps<T> extends Pick<MarkerOptions, 'zIn
|
|
|
111
111
|
data: CanvasData<T>[];
|
|
112
112
|
/** 폴리곤 클릭 시 호출되는 콜백 함수 */
|
|
113
113
|
onClick?: (payload: CanvasData<T>, selectedIds: Set<string>) => void;
|
|
114
|
+
/** 폴리곤에 마우스가 올라갔을 때 호출되는 콜백 함수 */
|
|
115
|
+
onMouseOver?: (payload: CanvasData<T>) => void;
|
|
116
|
+
/** 폴리곤에서 마우스가 벗어났을 때 호출되는 콜백 함수 */
|
|
117
|
+
onMouseOut?: (payload: CanvasData<T>) => void;
|
|
114
118
|
/** 다중 선택 활성화 여부 (기본값: false) */
|
|
115
119
|
enableMultiSelect?: boolean;
|
|
116
120
|
/** 뷰포트 컬링 여유 공간 (픽셀 단위, 기본값: 100) */
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
require('../../../types/MapDrawables.js');
|
|
7
|
-
require('../../../types/MapTypes.js');
|
|
8
|
-
require('../../../types/MapEventTypes.js');
|
|
5
|
+
var utils = require('./utils.js');
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* 캔버스 데이터 타입 Enum
|
|
@@ -29,3 +26,6 @@ exports.RenderSource = void 0;
|
|
|
29
26
|
RenderSource["EVENT"] = "EVENT";
|
|
30
27
|
RenderSource["TOP"] = "TOP";
|
|
31
28
|
})(exports.RenderSource || (exports.RenderSource = {}));
|
|
29
|
+
|
|
30
|
+
exports.createCanvasData = utils.createCanvasData;
|
|
31
|
+
exports.createCanvasDataArray = utils.createCanvasDataArray;
|
|
@@ -195,6 +195,8 @@ var hexToRgba = function (hexColor, alpha) {
|
|
|
195
195
|
var b = parseInt(hex.substring(4, 6), 16);
|
|
196
196
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
197
197
|
};
|
|
198
|
+
var tempCanvas = document.createElement('canvas');
|
|
199
|
+
var tempCtx = tempCanvas.getContext('2d');
|
|
198
200
|
/**
|
|
199
201
|
* 텍스트 박스 너비 계산
|
|
200
202
|
*
|
|
@@ -211,8 +213,6 @@ var calculateTextBoxWidth = function (_a) {
|
|
|
211
213
|
minWidth = _a.minWidth,
|
|
212
214
|
padding = _a.padding,
|
|
213
215
|
text = _a.text;
|
|
214
|
-
var tempCanvas = document.createElement('canvas');
|
|
215
|
-
var tempCtx = tempCanvas.getContext('2d');
|
|
216
216
|
if (!tempCtx) return 0;
|
|
217
217
|
tempCtx.font = fontConfig;
|
|
218
218
|
var textWidth = tempCtx.measureText(text).width;
|
|
@@ -18,6 +18,7 @@ require('../core/advanced/canvas/CanvasMarkerClaude.js');
|
|
|
18
18
|
require('../core/advanced/shared/context.js');
|
|
19
19
|
require('../core/advanced/shared/performance.js');
|
|
20
20
|
require('../core/advanced/shared/types.js');
|
|
21
|
+
require('../core/advanced/shared/utils.js');
|
|
21
22
|
require('konva');
|
|
22
23
|
require('../core/util/geo.js');
|
|
23
24
|
require('../core/util/animation.js');
|
|
@@ -19,6 +19,7 @@ require('../core/advanced/canvas/CanvasMarkerClaude.js');
|
|
|
19
19
|
require('../core/advanced/shared/context.js');
|
|
20
20
|
require('../core/advanced/shared/performance.js');
|
|
21
21
|
require('../core/advanced/shared/types.js');
|
|
22
|
+
require('../core/advanced/shared/utils.js');
|
|
22
23
|
require('konva');
|
|
23
24
|
require('../core/util/geo.js');
|
|
24
25
|
require('../core/util/animation.js');
|
|
@@ -19,6 +19,7 @@ require('../core/advanced/canvas/CanvasMarkerClaude.js');
|
|
|
19
19
|
require('../core/advanced/shared/context.js');
|
|
20
20
|
require('../core/advanced/shared/performance.js');
|
|
21
21
|
require('../core/advanced/shared/types.js');
|
|
22
|
+
require('../core/advanced/shared/utils.js');
|
|
22
23
|
require('konva');
|
|
23
24
|
require('../core/util/geo.js');
|
|
24
25
|
require('../core/util/animation.js');
|
package/dist/index.es.js
CHANGED
|
@@ -1687,6 +1687,8 @@ var hexToRgba = function (hexColor, alpha) {
|
|
|
1687
1687
|
var b = parseInt(hex.substring(4, 6), 16);
|
|
1688
1688
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
1689
1689
|
};
|
|
1690
|
+
var tempCanvas = document.createElement('canvas');
|
|
1691
|
+
var tempCtx = tempCanvas.getContext('2d');
|
|
1690
1692
|
/**
|
|
1691
1693
|
* 텍스트 박스 너비 계산
|
|
1692
1694
|
*
|
|
@@ -1703,8 +1705,6 @@ var calculateTextBoxWidth = function (_a) {
|
|
|
1703
1705
|
minWidth = _a.minWidth,
|
|
1704
1706
|
padding = _a.padding,
|
|
1705
1707
|
text = _a.text;
|
|
1706
|
-
var tempCanvas = document.createElement('canvas');
|
|
1707
|
-
var tempCtx = tempCanvas.getContext('2d');
|
|
1708
1708
|
if (!tempCtx) return 0;
|
|
1709
1709
|
tempCtx.font = fontConfig;
|
|
1710
1710
|
var textWidth = tempCtx.measureText(text).width;
|
|
@@ -5996,6 +5996,8 @@ var CanvasPolygonLayer = function (props) {
|
|
|
5996
5996
|
_b = props.cullingMargin,
|
|
5997
5997
|
cullingMargin = _b === void 0 ? DEFAULT_CULLING_MARGIN : _b,
|
|
5998
5998
|
onClick = props.onClick,
|
|
5999
|
+
onMouseOver = props.onMouseOver,
|
|
6000
|
+
onMouseOut = props.onMouseOut,
|
|
5999
6001
|
onOptimizationDataUpdate = props.onOptimizationDataUpdate,
|
|
6000
6002
|
externalSelectedItems = props.selectedItems,
|
|
6001
6003
|
externalSelectedItem = props.selectedItem,
|
|
@@ -6003,7 +6005,7 @@ var CanvasPolygonLayer = function (props) {
|
|
|
6003
6005
|
disableInteraction = _c === void 0 ? false : _c,
|
|
6004
6006
|
_d = props.spatialGridCellSize,
|
|
6005
6007
|
spatialGridCellSize = _d === void 0 ? SPATIAL_GRID_CELL_SIZE : _d,
|
|
6006
|
-
options = __rest(props, ["data", "enableMultiSelect", "cullingMargin", "onClick", "onOptimizationDataUpdate", "selectedItems", "selectedItem", "disableInteraction", "spatialGridCellSize"]); // customStyle은 다른 방식과 함께 사용 가능
|
|
6008
|
+
options = __rest(props, ["data", "enableMultiSelect", "cullingMargin", "onClick", "onMouseOver", "onMouseOut", "onOptimizationDataUpdate", "selectedItems", "selectedItem", "disableInteraction", "spatialGridCellSize"]); // customStyle은 다른 방식과 함께 사용 가능
|
|
6007
6009
|
|
|
6008
6010
|
|
|
6009
6011
|
var hasCustomStyle = 'customStyle' in props && props.customStyle !== undefined;
|
|
@@ -6322,7 +6324,17 @@ var CanvasPolygonLayer = function (props) {
|
|
|
6322
6324
|
return;
|
|
6323
6325
|
}
|
|
6324
6326
|
|
|
6325
|
-
hoveredItemRef.current
|
|
6327
|
+
var prevHovered = hoveredItemRef.current;
|
|
6328
|
+
hoveredItemRef.current = hoveredData; // onMouseOut: 이전 hover 항목에서 벗어남
|
|
6329
|
+
|
|
6330
|
+
if (prevHovered && prevHovered !== hoveredData) {
|
|
6331
|
+
onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(prevHovered);
|
|
6332
|
+
} // onMouseOver: 새로운 항목에 hover
|
|
6333
|
+
|
|
6334
|
+
|
|
6335
|
+
if (hoveredData && hoveredData !== prevHovered) {
|
|
6336
|
+
onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver(hoveredData);
|
|
6337
|
+
}
|
|
6326
6338
|
|
|
6327
6339
|
if (draggingRef.current) {
|
|
6328
6340
|
controller.setMapCursor('grabbing');
|
|
@@ -6396,6 +6408,7 @@ var CanvasPolygonLayer = function (props) {
|
|
|
6396
6408
|
var prevHovered = hoveredItemRef.current;
|
|
6397
6409
|
if (!prevHovered) return;
|
|
6398
6410
|
hoveredItemRef.current = null;
|
|
6411
|
+
onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(prevHovered);
|
|
6399
6412
|
controller.setMapCursor('grab');
|
|
6400
6413
|
doRenderEvent();
|
|
6401
6414
|
}; // DOM 초기화
|
package/dist/index.umd.js
CHANGED
|
@@ -1691,6 +1691,8 @@
|
|
|
1691
1691
|
var b = parseInt(hex.substring(4, 6), 16);
|
|
1692
1692
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
1693
1693
|
};
|
|
1694
|
+
var tempCanvas = document.createElement('canvas');
|
|
1695
|
+
var tempCtx = tempCanvas.getContext('2d');
|
|
1694
1696
|
/**
|
|
1695
1697
|
* 텍스트 박스 너비 계산
|
|
1696
1698
|
*
|
|
@@ -1707,8 +1709,6 @@
|
|
|
1707
1709
|
minWidth = _a.minWidth,
|
|
1708
1710
|
padding = _a.padding,
|
|
1709
1711
|
text = _a.text;
|
|
1710
|
-
var tempCanvas = document.createElement('canvas');
|
|
1711
|
-
var tempCtx = tempCanvas.getContext('2d');
|
|
1712
1712
|
if (!tempCtx) return 0;
|
|
1713
1713
|
tempCtx.font = fontConfig;
|
|
1714
1714
|
var textWidth = tempCtx.measureText(text).width;
|
|
@@ -6000,6 +6000,8 @@
|
|
|
6000
6000
|
_b = props.cullingMargin,
|
|
6001
6001
|
cullingMargin = _b === void 0 ? DEFAULT_CULLING_MARGIN : _b,
|
|
6002
6002
|
onClick = props.onClick,
|
|
6003
|
+
onMouseOver = props.onMouseOver,
|
|
6004
|
+
onMouseOut = props.onMouseOut,
|
|
6003
6005
|
onOptimizationDataUpdate = props.onOptimizationDataUpdate,
|
|
6004
6006
|
externalSelectedItems = props.selectedItems,
|
|
6005
6007
|
externalSelectedItem = props.selectedItem,
|
|
@@ -6007,7 +6009,7 @@
|
|
|
6007
6009
|
disableInteraction = _c === void 0 ? false : _c,
|
|
6008
6010
|
_d = props.spatialGridCellSize,
|
|
6009
6011
|
spatialGridCellSize = _d === void 0 ? SPATIAL_GRID_CELL_SIZE : _d,
|
|
6010
|
-
options = tslib.__rest(props, ["data", "enableMultiSelect", "cullingMargin", "onClick", "onOptimizationDataUpdate", "selectedItems", "selectedItem", "disableInteraction", "spatialGridCellSize"]); // customStyle은 다른 방식과 함께 사용 가능
|
|
6012
|
+
options = tslib.__rest(props, ["data", "enableMultiSelect", "cullingMargin", "onClick", "onMouseOver", "onMouseOut", "onOptimizationDataUpdate", "selectedItems", "selectedItem", "disableInteraction", "spatialGridCellSize"]); // customStyle은 다른 방식과 함께 사용 가능
|
|
6011
6013
|
|
|
6012
6014
|
|
|
6013
6015
|
var hasCustomStyle = 'customStyle' in props && props.customStyle !== undefined;
|
|
@@ -6326,7 +6328,17 @@
|
|
|
6326
6328
|
return;
|
|
6327
6329
|
}
|
|
6328
6330
|
|
|
6329
|
-
hoveredItemRef.current
|
|
6331
|
+
var prevHovered = hoveredItemRef.current;
|
|
6332
|
+
hoveredItemRef.current = hoveredData; // onMouseOut: 이전 hover 항목에서 벗어남
|
|
6333
|
+
|
|
6334
|
+
if (prevHovered && prevHovered !== hoveredData) {
|
|
6335
|
+
onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(prevHovered);
|
|
6336
|
+
} // onMouseOver: 새로운 항목에 hover
|
|
6337
|
+
|
|
6338
|
+
|
|
6339
|
+
if (hoveredData && hoveredData !== prevHovered) {
|
|
6340
|
+
onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver(hoveredData);
|
|
6341
|
+
}
|
|
6330
6342
|
|
|
6331
6343
|
if (draggingRef.current) {
|
|
6332
6344
|
controller.setMapCursor('grabbing');
|
|
@@ -6400,6 +6412,7 @@
|
|
|
6400
6412
|
var prevHovered = hoveredItemRef.current;
|
|
6401
6413
|
if (!prevHovered) return;
|
|
6402
6414
|
hoveredItemRef.current = null;
|
|
6415
|
+
onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(prevHovered);
|
|
6403
6416
|
controller.setMapCursor('grab');
|
|
6404
6417
|
doRenderEvent();
|
|
6405
6418
|
}; // DOM 초기화
|
|
Binary file
|