Skip to content

Commit 16281de

Browse files
committed
move_resizeF_invocation_from_body-core-comp_to_body.ctrl
1 parent a8d03cb commit 16281de

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/core/body/body.ctrl.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ export declare class BodyCtrl {
1212
onMouseMove(e: MouseEvent);
1313
onMouseLeave(e: MouseEvent);
1414
onMouseUp(e: MouseEvent);
15+
resize(): void;
1516
}

src/core/body/body.ctrl.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ export class BodyCtrl {
226226
}
227227
}
228228

229+
resize() {
230+
this.scrollService.resize();
231+
}
232+
229233
get selection() {
230234
return this.model.selection();
231235
}

src/lib/main/core/body/body-core.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class BodyCoreComponent extends NgComponent implements OnInit {
5858

5959
listener.on('mousedown', ctrl.onMouseDown.bind(ctrl));
6060

61-
windowListener.on('resize', () => ctrl.scrollService.resize());
61+
windowListener.on('resize', () => ctrl.resize());
6262
windowListener.on('mouseup', (e) => {
6363
const isActive = model.focus().isActive;
6464
if (isActive) {

0 commit comments

Comments
 (0)