@nine-lab/nine-mu 0.1.41 → 0.1.42
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/nine-mu.js +15 -4
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NineDiff.js +15 -0
package/package.json
CHANGED
|
@@ -238,6 +238,17 @@ export class NineDiff extends HTMLElement {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
#initCodeMirror = () => {
|
|
241
|
+
|
|
242
|
+
let asisReady = false;
|
|
243
|
+
let tobeReady = false;
|
|
244
|
+
|
|
245
|
+
const checkAllReady = () => {
|
|
246
|
+
if (asisReady && tobeReady) {
|
|
247
|
+
// 진짜로 둘 다 화면에 그려졌을 때 신호를 보냄
|
|
248
|
+
this.dispatchEvent(new CustomEvent('ready', { bubbles: true, composed: true }));
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
|
|
241
252
|
this.#asisEditorEl = this.shadowRoot.querySelector('.panel.asis');
|
|
242
253
|
this.#tobeEditorEl = this.shadowRoot.querySelector('.panel.tobe');
|
|
243
254
|
|
|
@@ -285,6 +296,8 @@ export class NineDiff extends HTMLElement {
|
|
|
285
296
|
if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
|
|
286
297
|
update.view._initialAsisContentLoaded = true;
|
|
287
298
|
trace.log("CodeMirror ASIS view is ready for initial content.");
|
|
299
|
+
asisReady = true;
|
|
300
|
+
checkAllReady(); // ASIS 준비 완료
|
|
288
301
|
}
|
|
289
302
|
})
|
|
290
303
|
]
|
|
@@ -305,6 +318,8 @@ export class NineDiff extends HTMLElement {
|
|
|
305
318
|
if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
|
|
306
319
|
update.view._initialTobeContentLoaded = true;
|
|
307
320
|
trace.log("CodeMirror TOBE view is ready for initial content.");
|
|
321
|
+
tobeReady = true;
|
|
322
|
+
checkAllReady(); // ASIS 준비 완료
|
|
308
323
|
}
|
|
309
324
|
})
|
|
310
325
|
]
|