Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Ruler class to centralize common functionality and enforce subclass implementation #10907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Darshan-upadhyay1110
Copy link
Contributor

  • Converted ruler file into typescript
  • created base class and subclass for Horizontal and vertical ruler
  • Moved the _updatePaintTimer method to the base Ruler class to avoid duplication across HRuler and VRuler.
  • Added _updateBreakPoints as an abstract-like method in the base class, throwing an error to enforce implementation in subclasses.
  • Streamlined the initialization logic in Ruler.initializeRuler for better readability and modularity.

Change-Id: I8f0187588ffab533e135023285acb3dcada832d4

  • Resolves: #
  • Target version: master

Summary

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

browser/src/control/Ruler.ts Fixed Show fixed Hide fixed
browser/src/control/Ruler.ts Fixed Show fixed Hide fixed
…ubclass implementation

- Converted ruler file into typescript
- created base class and subclass for Horizontal and vertical ruler
- Moved the `_updatePaintTimer` method to the base `Ruler` class to avoid duplication across `HRuler` and `VRuler`.
- Added `_updateBreakPoints` as an abstract-like method in the base class, throwing an error to enforce implementation in subclasses.
- Streamlined the initialization logic in `Ruler.initializeRuler` for better readability and modularity.

Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Change-Id: I8f0187588ffab533e135023285acb3dcada832d4
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the private/darshan/ruler-typescript-conversion branch from 6489279 to 0a8e884 Compare January 10, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Review
Development

Successfully merging this pull request may close these issues.

1 participant