Skip to content

Commit c75b8fa

Browse files
committed
Experience with "MCSC"
1 parent f0a785a commit c75b8fa

8 files changed

Lines changed: 55 additions & 21 deletions

JS/customScaleCalc.js

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

JS/customScaleCalc.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Style/_config.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
}
77

88
body {
9-
background: rgb(19, 20, 21);
9+
// background: rgb(19, 20, 21);
10+
background-color: rgb(27, 29, 31);
1011
color: rgb(237, 232, 232);
1112
// width: 100%;
1213
height: 100vh;

Style/_customScaleCalc.scss

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
.default-properties {
2-
width: 2095px;
2+
// width: 300vw;
3+
width: 100%;
34
background-color: rgb(27, 29, 31);
45
// box-shadow: 0 0 10px 10px rgba(13, 13, 13, 0.732);
56
}
67

78
.custom-scale-calc {
9+
// position: absolute;
10+
// right: 50vw;
811
// transform: scale(0.5) rotate(90deg) translate(-50%, -53%);
9-
width: 140vh;
10-
overflow: hidden;
11-
position: absolute;
12-
// transform-origin: top;
12+
// width: 140vh;
13+
// transform-origin: left-top;
14+
// height: 500px !important;
15+
transform-origin: center;
16+
position: relative;
17+
top: 24vh;
18+
width: 1000px;
1319
}

Style/_input-output-sections.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
resize: none;
2424
color: white;
2525
font-family: "Vazirmatn";
26-
line-height: 24px;
26+
line-height: 22px;
2727
direction: rtl;
2828

2929
&::selection {

Style/style.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
body {
10-
background: rgb(19, 20, 21);
10+
background-color: rgb(27, 29, 31);
1111
color: rgb(237, 232, 232);
1212
height: 100vh;
1313
display: flex;
@@ -40,14 +40,15 @@ body {
4040
}
4141

4242
.default-properties {
43-
width: 2095px;
43+
width: 100%;
4444
background-color: rgb(27, 29, 31);
4545
}
4646

4747
.custom-scale-calc {
48-
width: 140vh;
49-
overflow: hidden;
50-
position: absolute;
48+
transform-origin: center;
49+
position: relative;
50+
top: 24vh;
51+
width: 1000px;
5152
}
5253

5354
@keyframes shake {
@@ -154,7 +155,7 @@ body {
154155
resize: none;
155156
color: white;
156157
font-family: "Vazirmatn";
157-
line-height: 24px;
158+
line-height: 22px;
158159
direction: rtl;
159160
}
160161
.input-section .input-list::-moz-selection, .input-section .output-list::-moz-selection, .output-section .input-list::-moz-selection, .output-section .output-list::-moz-selection {

Style/style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TS/customScaleCalc.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,33 @@ const customScaleCalc = () => {
88

99
if (pageWidth > 270) {
1010
if (pageHeight > pageWidth) {
11-
console.log(pageWidth, pageHeight);
11+
// console.log(pageWidth, pageHeight);
1212

1313
customScaleDiv.classList.add("custom-scale-calc");
1414

15-
let scale = 1 - ((pageHeight / pageWidth) * 0.5) / (900 / 477);
15+
// let scale = 1 - ((pageHeight / pageWidth) * 0.2) / (900 / 477);
1616

17-
customScaleDiv.style.transform = `scale(${scale}) rotate(90deg)`;
17+
// customScaleDiv.style.transform = `scale(${scale}) rotate(90deg)`;
18+
19+
// customScaleDiv.classList.remove("custom-scale-calc");
20+
// customScaleDiv.style.transform = "";
21+
22+
let scaleValue = 0;
23+
24+
if (pageHeight / pageWidth > 1130 / 780) {
25+
scaleValue = (1 * pageWidth) / 695;
26+
} else {
27+
scaleValue = (0.7 * pageWidth) / 695;
28+
}
29+
30+
customScaleDiv.style.transform = `scale(${scaleValue}) rotate(90deg)`;
31+
customScaleDiv.style.display = "block";
32+
33+
// customScaleDiv.style.top = `${(pageHeight - 920 * scaleValue)/2}px`;
34+
35+
// customScaleDiv.style.transformOrigin = "top";
36+
37+
// console.log("scale", scale);
1838
} else {
1939
customScaleDiv.classList.remove("custom-scale-calc");
2040
// customScaleDiv.style.transform = "";

0 commit comments

Comments
 (0)