Skip to content

Commit e72f131

Browse files
committed
cleanup
1 parent ea59eae commit e72f131

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

blocks/card/CardAbstract.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export default class CardAbstract {
4040
);
4141
}
4242

43+
/**
44+
* flushes all rect caches
45+
* @returns {void}
46+
*/
4347
flushRectCaches() {
4448
this._ct.flushRectCaches();
4549
this._cm.flushRectCaches();

blocks/card/card.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ window.addEventListener('load', () => {
2020
// C.doEvent(e);
2121
});
2222

23+
/**
24+
* flushes all caches that can be flushed
25+
* @returns {void}
26+
*/
2327
const onMove = () => {
2428
CP.flushRectCaches();
2529
CM.flushRectCaches();
2630
//C.flushRectCaches();
27-
}
31+
};
2832

2933
window.addEventListener('pushstate', onMove);
3034
window.addEventListener('popstate', onMove);

js/eventControl/EventControlElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class EventControlElement {
5252
if(this._rect === undefined || this._rectSafe !== 0) {
5353
const newRect = this.domElement.getBoundingClientRect();
5454

55-
if(this._rect !== undefined) {
55+
if(this._rect !== undefined) {
5656
this._rectSafe--;
5757
for(let a in newRect) {
5858
if(newRect[a] !== this._rect) {

js/eventControl/EventController.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ export default class EventController {
120120
});
121121
}
122122

123+
/**
124+
* flushes the cache for each eventControlElement
125+
* @see {EventControlElement.flushRectCache}
126+
*/
123127
flushRectCaches() {
124128
this.eventControlElements
125129
.forEach(ece => ece.flushRectCache());

0 commit comments

Comments
 (0)