MCPcopy
hub / github.com/iChochy/NCE / bindNavigation

Method bindNavigation

js/ReadingSystem.js:1097–1108  ·  view source on GitHub ↗

* 绑定导航事件

()

Source from the content-addressed store, hash-verified

1095 * 绑定导航事件
1096 */
1097 bindNavigation() {
1098 if (this.bindingFlags.navigation) return;
1099 this.bindingFlags.navigation = true;
1100
1101 if (this.dom.prevUnitBtn) {
1102 on(this.dom.prevUnitBtn, 'click', () => this.loadPreviousUnit());
1103 }
1104
1105 if (this.dom.nextUnitBtn) {
1106 on(this.dom.nextUnitBtn, 'click', () => this.loadNextUnit());
1107 }
1108 }
1109
1110 /**
1111 * 绑定翻译切换事件

Callers 1

bindAllEventsMethod · 0.95

Calls 3

loadPreviousUnitMethod · 0.95
loadNextUnitMethod · 0.95
onFunction · 0.90

Tested by

no test coverage detected