ide-assi 0.362.0 → 0.363.0
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/bundle.cjs.js +36 -1
- package/dist/bundle.esm.js +36 -1
- package/dist/components/ideDiff.js +3 -1
- package/package.json +1 -1
- package/src/components/ideDiff.js +3 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -234969,7 +234969,42 @@ class IdeDiff extends HTMLElement {
|
|
|
234969
234969
|
|
|
234970
234970
|
// ⭐️ 스크롤 리스너를 제어할 수 있도록 플래그 및 클래스 메서드 사용
|
|
234971
234971
|
#setupScrollSync = () => {
|
|
234972
|
-
|
|
234972
|
+
|
|
234973
|
+
console.log("setupScrollSync");
|
|
234974
|
+
|
|
234975
|
+
// 기존 리스너가 있다면 제거 (중복 방지 및 disconnectedCallback에서 제거 용이)
|
|
234976
|
+
if (this._asisScrollHandler) { // 핸들러가 이미 할당되어 있다면
|
|
234977
|
+
this.#asisEditorView.scrollDOM.removeEventListener('scroll', this._asisScrollHandler);
|
|
234978
|
+
this.#tobeEditorView.scrollDOM.removeEventListener('scroll', this._tobeScrollHandler);
|
|
234979
|
+
}
|
|
234980
|
+
|
|
234981
|
+
let scrollingA = false;
|
|
234982
|
+
let scrollingB = false;
|
|
234983
|
+
|
|
234984
|
+
this._asisScrollHandler = () => {
|
|
234985
|
+
if (!this.#isScrollSyncActive) return; // 활성화되지 않았으면 스킵
|
|
234986
|
+
|
|
234987
|
+
if (!scrollingB) {
|
|
234988
|
+
scrollingA = true;
|
|
234989
|
+
this.#tobeEditorView.scrollDOM.scrollTop = this.#asisEditorView.scrollDOM.scrollTop;
|
|
234990
|
+
this.#tobeEditorView.scrollDOM.scrollLeft = this.#asisEditorView.scrollDOM.scrollLeft;
|
|
234991
|
+
}
|
|
234992
|
+
scrollingB = false;
|
|
234993
|
+
};
|
|
234994
|
+
|
|
234995
|
+
this._tobeScrollHandler = () => {
|
|
234996
|
+
if (!this.#isScrollSyncActive) return; // 활성화되지 않았으면 스킵
|
|
234997
|
+
|
|
234998
|
+
if (!scrollingA) {
|
|
234999
|
+
scrollingB = true;
|
|
235000
|
+
this.#asisEditorView.scrollDOM.scrollTop = this.#tobeEditorView.scrollDOM.scrollTop;
|
|
235001
|
+
this.#asisEditorView.scrollDOM.scrollLeft = this.#tobeEditorView.scrollDOM.scrollLeft;
|
|
235002
|
+
}
|
|
235003
|
+
scrollingA = false;
|
|
235004
|
+
};
|
|
235005
|
+
|
|
235006
|
+
this.#asisEditorView.scrollDOM.addEventListener('scroll', this._asisScrollHandler);
|
|
235007
|
+
this.#tobeEditorView.scrollDOM.addEventListener('scroll', this._tobeScrollHandler);
|
|
234973
235008
|
};
|
|
234974
235009
|
|
|
234975
235010
|
// #applyDiffDecorations 함수 (이전 수정본과 동일, Text.of 사용)
|
package/dist/bundle.esm.js
CHANGED
|
@@ -234965,7 +234965,42 @@ class IdeDiff extends HTMLElement {
|
|
|
234965
234965
|
|
|
234966
234966
|
// ⭐️ 스크롤 리스너를 제어할 수 있도록 플래그 및 클래스 메서드 사용
|
|
234967
234967
|
#setupScrollSync = () => {
|
|
234968
|
-
|
|
234968
|
+
|
|
234969
|
+
console.log("setupScrollSync");
|
|
234970
|
+
|
|
234971
|
+
// 기존 리스너가 있다면 제거 (중복 방지 및 disconnectedCallback에서 제거 용이)
|
|
234972
|
+
if (this._asisScrollHandler) { // 핸들러가 이미 할당되어 있다면
|
|
234973
|
+
this.#asisEditorView.scrollDOM.removeEventListener('scroll', this._asisScrollHandler);
|
|
234974
|
+
this.#tobeEditorView.scrollDOM.removeEventListener('scroll', this._tobeScrollHandler);
|
|
234975
|
+
}
|
|
234976
|
+
|
|
234977
|
+
let scrollingA = false;
|
|
234978
|
+
let scrollingB = false;
|
|
234979
|
+
|
|
234980
|
+
this._asisScrollHandler = () => {
|
|
234981
|
+
if (!this.#isScrollSyncActive) return; // 활성화되지 않았으면 스킵
|
|
234982
|
+
|
|
234983
|
+
if (!scrollingB) {
|
|
234984
|
+
scrollingA = true;
|
|
234985
|
+
this.#tobeEditorView.scrollDOM.scrollTop = this.#asisEditorView.scrollDOM.scrollTop;
|
|
234986
|
+
this.#tobeEditorView.scrollDOM.scrollLeft = this.#asisEditorView.scrollDOM.scrollLeft;
|
|
234987
|
+
}
|
|
234988
|
+
scrollingB = false;
|
|
234989
|
+
};
|
|
234990
|
+
|
|
234991
|
+
this._tobeScrollHandler = () => {
|
|
234992
|
+
if (!this.#isScrollSyncActive) return; // 활성화되지 않았으면 스킵
|
|
234993
|
+
|
|
234994
|
+
if (!scrollingA) {
|
|
234995
|
+
scrollingB = true;
|
|
234996
|
+
this.#asisEditorView.scrollDOM.scrollTop = this.#tobeEditorView.scrollDOM.scrollTop;
|
|
234997
|
+
this.#asisEditorView.scrollDOM.scrollLeft = this.#tobeEditorView.scrollDOM.scrollLeft;
|
|
234998
|
+
}
|
|
234999
|
+
scrollingA = false;
|
|
235000
|
+
};
|
|
235001
|
+
|
|
235002
|
+
this.#asisEditorView.scrollDOM.addEventListener('scroll', this._asisScrollHandler);
|
|
235003
|
+
this.#tobeEditorView.scrollDOM.addEventListener('scroll', this._tobeScrollHandler);
|
|
234969
235004
|
};
|
|
234970
235005
|
|
|
234971
235006
|
// #applyDiffDecorations 함수 (이전 수정본과 동일, Text.of 사용)
|
|
@@ -217,7 +217,9 @@ export class IdeDiff extends HTMLElement {
|
|
|
217
217
|
|
|
218
218
|
// ⭐️ 스크롤 리스너를 제어할 수 있도록 플래그 및 클래스 메서드 사용
|
|
219
219
|
#setupScrollSync = () => {
|
|
220
|
-
|
|
220
|
+
|
|
221
|
+
console.log("setupScrollSync");
|
|
222
|
+
|
|
221
223
|
// 기존 리스너가 있다면 제거 (중복 방지 및 disconnectedCallback에서 제거 용이)
|
|
222
224
|
if (this._asisScrollHandler) { // 핸들러가 이미 할당되어 있다면
|
|
223
225
|
this.#asisEditorView.scrollDOM.removeEventListener('scroll', this._asisScrollHandler);
|
package/package.json
CHANGED
|
@@ -217,7 +217,9 @@ export class IdeDiff extends HTMLElement {
|
|
|
217
217
|
|
|
218
218
|
// ⭐️ 스크롤 리스너를 제어할 수 있도록 플래그 및 클래스 메서드 사용
|
|
219
219
|
#setupScrollSync = () => {
|
|
220
|
-
|
|
220
|
+
|
|
221
|
+
console.log("setupScrollSync");
|
|
222
|
+
|
|
221
223
|
// 기존 리스너가 있다면 제거 (중복 방지 및 disconnectedCallback에서 제거 용이)
|
|
222
224
|
if (this._asisScrollHandler) { // 핸들러가 이미 할당되어 있다면
|
|
223
225
|
this.#asisEditorView.scrollDOM.removeEventListener('scroll', this._asisScrollHandler);
|