Skip to content

Commit 2253eae

Browse files
committed
add point: bug fix, add panY
1 parent 3ef0e93 commit 2253eae

24 files changed

+803
-312
lines changed

app/build/mojs-curve-editor.js

Lines changed: 449 additions & 221 deletions
Large diffs are not rendered by default.

app/build/mojs-curve-editor.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/css/assets/colors.postcss.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
$c-purple: #3A0839;
3+
$c-light-purple: #572B51;
34
$c-pastel-purple: #9C829A;
45
$c-orange: #FF512F;
56
$c-white : #FFFFFF;

app/css/blocks/curve-editor.postcss.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
width: calc( 403 * $PX );
88
height: calc( 378 * $PX );
99
border-radius: calc( 12 * $PX );
10-
background: #572B51;
10+
background: $c-light-purple;
1111
z-index: 100;
12-
box-shadow: 2px 2px 2px rgba(0,0,0,.38);
12+
/*box-shadow: 2px 2px 2px rgba(0,0,0,.38);*/
13+
box-shadow: 0 0 calc( 3*$PX ) calc( 1*$PX ) rgba(0,0,0,.38);
1314

1415
& * {
1516
box-sizing: border-box;
@@ -44,11 +45,11 @@
4445
position: absolute;
4546

4647
&[data-type="top"] {
47-
top: calc( -$radius*$PX );
48+
top: calc( (-$radius - 1)*$PX );
4849
}
4950

5051
&[data-type="bottom"] {
51-
bottom: 0;
52+
bottom: calc( 1*$PX );
5253
}
5354

5455
&[data-type="top"],
@@ -58,7 +59,7 @@
5859
}
5960

6061
&[data-type="right"] {
61-
right: calc( -$radius*$PX );
62+
right: calc( (-$radius + 1)*$PX );
6263
top: 50%;
6364
margin-top: calc( -$radius*$PX );
6465
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"curve-editor":"_curve-editor_llwjd_3","curve-editor__left":"_curve-editor__left_llwjd_1","curve-editor__right":"_curve-editor__right_llwjd_1","curve-editor__resize-handle":"_curve-editor__resize-handle_llwjd_1","curve-editor__anchor-buttons":"_curve-editor__anchor-buttons_llwjd_1","curve-editor__mojs-logo":"_curve-editor__mojs-logo_llwjd_1"}
1+
{"curve-editor":"_curve-editor_pbam1_3","curve-editor__left":"_curve-editor__left_pbam1_1","curve-editor__right":"_curve-editor__right_pbam1_1","curve-editor__resize-handle":"_curve-editor__resize-handle_pbam1_1","curve-editor__anchor-buttons":"_curve-editor__anchor-buttons_pbam1_1","curve-editor__mojs-logo":"_curve-editor__mojs-logo_pbam1_1"}

app/css/blocks/curve.postcss.css

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/css/blocks/curve.postcss.css.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"curve":"_curve_k9lsx_5","curve__background":"_curve__background_k9lsx_1","curve__svg-wrapper":"_curve__svg-wrapper_k9lsx_1","curve__svg":"_curve__svg_k9lsx_1","curve__svg-segment":"_curve__svg-segment_k9lsx_1"}
1+
{"curve":"_curve_1k7gs_5","curve__background":"_curve__background_1k7gs_1","curve__svg-wrapper":"_curve__svg-wrapper_1k7gs_1","curve__svg":"_curve__svg_1k7gs_1","curve__svg-segment":"_curve__svg-segment_1k7gs_1"}

app/css/blocks/resize-handle.postcss.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ $radius: 16;
1212
border-top-left-radius: calc( 3*$PX );
1313
border-top-right-radius: calc( 3*$PX );
1414
transform-origin: 50% 100%;
15+
box-shadow: inset 0 0 0 calc( 1*$PX ) $c-light-purple;
1516

1617
&:after {
1718
content: '';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"resize-handle":"_resize-handle_k81kc_4","resize-handle--right":"_resize-handle--right_k81kc_1","resize-handle--bottom":"_resize-handle--bottom_k81kc_1"}
1+
{"resize-handle":"_resize-handle_1uncf_4","resize-handle--right":"_resize-handle--right_1uncf_1","resize-handle--bottom":"_resize-handle--bottom_1uncf_1"}

app/css/blocks/ruler.postcss.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@import '../assets/globals.postcss.css';
2+
3+
$size: 350;
4+
.ruler {
5+
position: absolute;
6+
left: 0;
7+
top: calc( -$size*3 * $PX );
8+
height: calc( $size * 7 * $PX );
9+
width: calc( 18*$PX );
10+
11+
&--right {
12+
left: auto;
13+
right: 0;
14+
}
15+
16+
$itemSize: 14;
17+
&__item {
18+
position: absolute;
19+
color: $c-pastel-purple;
20+
font-size: 8px;
21+
font-family: sans-serif;
22+
border-radius: 50%;
23+
left: 50%;
24+
width: calc($itemSize/2*$PX);
25+
height: calc($itemSize*$PX);
26+
text-align: center;
27+
line-height: calc($itemSize*$PX);
28+
29+
margin-top: calc(3*$PX);
30+
margin-left: calc((-$itemSize/4)*$PX);
31+
32+
&--0 {
33+
top: calc(4*$size*$PX);
34+
}
35+
36+
&--1 {
37+
top: calc(3*$size*$PX);
38+
}
39+
40+
&--2 {
41+
top: calc(2*$size*$PX);
42+
}
43+
44+
&--n1 {
45+
top: calc(5*$size*$PX);
46+
}
47+
48+
&--n2 {
49+
top: calc(6*$size*$PX);
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)