Skip to content

Commit

Permalink
Merge pull request #109 from sarchlab/106-daisen-overview-panel-compo…
Browse files Browse the repository at this point in the history
…nent-names-should-be-more-intuitive-to-be-clickable

make widget title more clickable
  • Loading branch information
syifan committed May 30, 2024
2 parents 674be9a + dc66a86 commit 10a624a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions daisen/static/src/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ body {
height: 20px;
}

.dashboard .widget .title-bar {
text-decoration: underline;
cursor: pointer;
transition: color 0.3s ease;
}

.dashboard .widget .title-bar h6:hover {
color: #007BFF;
}

.circle-primary {
width: 0.6em;
height: 0.6em;
Expand Down
7 changes: 5 additions & 2 deletions daisen/static/src/widget.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as d3 from "d3";
import Dashboard from "./dashboard";
import TaskPage from "./taskpage";
import { ZoomHandler, MouseEventHandler } from "./mouseeventhandler";

class TimeValue {
Expand All @@ -19,6 +20,8 @@ class Widget implements ZoomHandler {
_canvas: HTMLDivElement;
_svg: SVGElement;
_mouseEventHandler: MouseEventHandler;
_thumbnail: HTMLDivElement;
_taskPage: TaskPage;

_numDots: number;
_startTime: number;
Expand Down Expand Up @@ -64,7 +67,7 @@ class Widget implements ZoomHandler {
this._graphPaddingTop = 5;
this._xAxisHeight = 30;
this._graphContentHeight =
this._graphHeight - this._xAxisHeight - this._graphPaddingTop;
this._graphHeight - this._xAxisHeight - this._graphPaddingTop;

this._startTime = 0;
this._endTime = 0;
Expand Down Expand Up @@ -224,7 +227,7 @@ class Widget implements ZoomHandler {

this._createSaveButton(titleBar);
}

_createSaveButton(titleBar: HTMLDivElement) {
const btn = document.createElement("div");
btn.classList.add("btn");
Expand Down

0 comments on commit 10a624a

Please sign in to comment.