add comments and update style

This commit is contained in:
Fine 2022-08-18 10:34:52 +08:00
parent 6a6cc7a29b
commit 434ea780cc
2 changed files with 12 additions and 5 deletions

View File

@ -107,6 +107,13 @@ function computeControlPoint(ps: number[], pe: number[], arc = 0.5) {
]; ];
} }
// Point coordinates of quadratic Bezier curve // Point coordinates of quadratic Bezier curve
/**
* @param t [0, 1]
* @param ps start position
* @param pc control position
* @param pe end position
* @returns a position in the line
*/
function quadraticBezier( function quadraticBezier(
t: number, t: number,
ps: { x: number; y: number }, ps: { x: number; y: number },

View File

@ -372,10 +372,10 @@ watch(
.switch-icon-edit { .switch-icon-edit {
cursor: pointer; cursor: pointer;
transition: all 0.5ms linear; transition: all 0.5ms linear;
background-color: #252a2f99; border: 1px solid #ccc;
color: #ddd; color: #666;
display: inline-block; display: inline-block;
padding: 5px 8px 8px; padding: 5px;
border-radius: 3px; border-radius: 3px;
position: absolute; position: absolute;
top: 20px; top: 20px;
@ -388,11 +388,11 @@ watch(
right: 10px; right: 10px;
width: 300px; width: 300px;
height: 160px; height: 160px;
background-color: #2b3037; background-color: #666;
overflow: auto; overflow: auto;
padding: 15px; padding: 15px;
border-radius: 3px; border-radius: 3px;
color: #ccc; color: #fff;
transition: all 0.5ms linear; transition: all 0.5ms linear;
} }