Skip to content

Commit

Permalink
feat: ✨ add new quick reports
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Aug 3, 2024
1 parent 3fe6110 commit da4049b
Show file tree
Hide file tree
Showing 6 changed files with 235 additions and 71 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"new-github-issue-url": "^1.0.0",
"node-fetch": "^3.3.2",
"numeric": "^1.2.6",
"ootk": "^4.0.1",
"ootk": "^4.0.2",
"papaparse": "^5.4.1",
"resizable": "^1.2.1",
"ts-node": "^10.9.1",
Expand Down
15 changes: 7 additions & 8 deletions src/lib/click-and-drag.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
interface ClickDragOptions {
minWidth?: number;
maxWidth?: number;
}
import { clickDragOptions } from '@app/plugins/KeepTrackPlugin';

export const clickAndDragWidth = (el: HTMLElement | null, options: ClickDragOptions = {}): void => {
export const clickAndDragWidth = (el: HTMLElement | null, options: clickDragOptions = {}): void => {
if (!el) {
return;
}
Expand All @@ -19,10 +16,12 @@ export const clickAndDragWidth = (el: HTMLElement | null, options: ClickDragOpti

settingsManager.isDragging = false;

// create new element on right edge
const edgeEl = createElWidth_(el);
if (options.isDraggable) {
// create new element on right edge
const edgeEl = createElWidth_(el);

addEventsWidth_(edgeEl, el, width, minWidth, maxWidth);
addEventsWidth_(edgeEl, el, width, minWidth, maxWidth);
}
};

export const clickAndDragHeight = (el: HTMLElement, maxHeight?: number, callback?: () => void): void => {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/KeepTrackPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class KeepTrackPlugin {
this.registerSubmitButtonClicked(this.submitCallback);
}

if (this.dragOptions?.isDraggable) {
if (this.dragOptions) {
this.registerClickAndDragOptions(this.dragOptions);
}

Expand Down Expand Up @@ -456,7 +456,7 @@ export class KeepTrackPlugin {
* @param callback The callback function to run when the bottom icon is clicked. This is run
* even if the bottom icon is disabled.
*/
registerBottomMenuClicked(callback: () => void = () => {}) {
registerBottomMenuClicked(callback: () => void = () => { }) {
if (this.isRequireSensorSelected && this.isRequireSatelliteSelected) {
keepTrackApi.register({
event: KeepTrackApiEvents.selectSatData,
Expand Down
Loading

0 comments on commit da4049b

Please sign in to comment.