publ-echo-test 0.0.292 → 0.0.294
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.
@@ -138,6 +138,10 @@ var GridItem = function (_a) {
|
|
138
138
|
var callback = function (mutationsList) {
|
139
139
|
for (var _i = 0, mutationsList_2 = mutationsList; _i < mutationsList_2.length; _i++) {
|
140
140
|
var mutation = mutationsList_2[_i];
|
141
|
+
console.log("mutation", mutation);
|
142
|
+
var isInitial = mutation.attributeName === "data-is-initialized" &&
|
143
|
+
mutation.target.getAttribute("data-is-initialized") === "true";
|
144
|
+
console.log("isInitial", isInitial);
|
141
145
|
var isSizeChanged = mutation.attributeName === "data-min-width" ||
|
142
146
|
mutation.attributeName === "data-min-height";
|
143
147
|
var keepWidth = true;
|
@@ -260,12 +264,17 @@ var GridItem = function (_a) {
|
|
260
264
|
var config = { attributes: true, characterData: true };
|
261
265
|
// 대상 노드와 설정으로 관찰 시작
|
262
266
|
observer.observe(targetNode, config);
|
267
|
+
setTimeout(function () {
|
268
|
+
targetNode.setAttribute("data-is-initialized", "true");
|
269
|
+
}, 100);
|
263
270
|
// 정리 함수에서 MutationObserver 해제
|
264
271
|
return function () {
|
265
272
|
if (targetNode.id !== "contentslist-box") {
|
266
273
|
return;
|
267
274
|
}
|
268
275
|
observer.disconnect();
|
276
|
+
// NOTE: 필수? 아니람 삭제
|
277
|
+
targetNode.removeAttribute("data-is-initialized");
|
269
278
|
};
|
270
279
|
}, [autoResize, isSelected, isDragging, isResizing, props.w, props.h, x, y]);
|
271
280
|
// useEffect(() => {
|