Skip to content

Commit 5ebbf0d

Browse files
committed
Update
1 parent c5418e8 commit 5ebbf0d

4 files changed

Lines changed: 35 additions & 15 deletions

File tree

ex1.htm

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,16 @@
5555

5656
// BUTTON: First Button. Parameters: (left, top, width, height)
5757
btnBlue = createButton(40, 40, 180, 50)
58-
that.text = "First Button"
58+
that.text = "HELLO"
5959
that.minimal = 1
60+
//that.round = 14
61+
//that.border = 3
62+
//that.borderColor = "rgba(0, 0, 0, 0.1)"
63+
//that.buttonElement.style.fontFamily = "opensans-bold"
64+
//that.fontSize = 22
65+
//that.textColor = "rgba(0, 0, 0, 0.7)"
66+
//that.width = "auto"
67+
//that.spaceX = 20
6068
//that.color = "orangered"
6169

6270
that.onClick(printHelloWorld)

index.htm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
// LABEL: Project #1 button.
238238
box.homePage.footer.btnGroup.btn2 = createLabel(0, 0, 121, 44)
239239
box.homePage.footer.btnGroup.add(that)
240-
that.text = "Project #1"
240+
that.text = "Project 1"
241241
footerButtonStyle(that)
242242
that.element.style.marginLeft = "10px"
243243
that.onClick(function() {
@@ -254,7 +254,7 @@
254254
// LABEL: Project #2 button.
255255
box.homePage.footer.btnGroup.btn3 = createLabel(0, 0, 121, 44)
256256
box.homePage.footer.btnGroup.add(that)
257-
that.text = "Project #2"
257+
that.text = "Project 2"
258258
footerButtonStyle(that)
259259
that.element.style.marginLeft = "10px"
260260
that.onClick(function() {
@@ -270,7 +270,7 @@
270270
// LABEL: ShowCase #1 button.
271271
box.homePage.footer.btnGroup.btn4 = createLabel(0, 0, 148, 44)
272272
box.homePage.footer.btnGroup.add(that)
273-
that.text = "ShowCase #1"
273+
that.text = "ShowCase 1"
274274
footerButtonStyle(that)
275275
that.element.style.marginLeft = "10px"
276276
that.onClick(function() {
@@ -286,7 +286,7 @@
286286
// LABEL: ShowCase #2 button.
287287
box.homePage.footer.btnGroup.btn5 = createLabel(0, 0, 148, 44)
288288
box.homePage.footer.btnGroup.add(that)
289-
that.text = "ShowCase #2"
289+
that.text = "ShowCase 2"
290290
footerButtonStyle(that)
291291
that.element.style.marginLeft = "10px"
292292
that.onClick(function() {

library/basic.js

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,16 @@ basic.start = function () {
130130
page.bodyElement.style.overflow = "hidden";
131131
page.box = createBox(0, 0, page.width, page.height);
132132
that.element.style.position = "fixed";
133+
//that.element.style.width = "100%";
134+
//that.element.style.height = "100%";
133135
that.color = "transparent";
134136

135137
page.onResize(function() {
136138
if (typeof page.refreshSize === "function") {
137139
page.refreshSize();
138140
}
139141
});
140-
142+
141143
if (typeof start === "function") {
142144
start();
143145
basic.afterStart();
@@ -280,17 +282,17 @@ basic.date = {
280282
let dt = new Date();
281283
return dt.getFullYear();
282284
},
283-
get mountNumber() {
285+
get monthNumber() {
284286
let dt = new Date();
285-
let mouth = dt.getMonth();
286-
mouth++;
287-
return mouth;
287+
let month = dt.getMonth();
288+
month++;
289+
return month;
288290
},
289291
get ayAdi() {
290-
return basic.aylar[this.mountNumber - 1];
292+
return basic.aylar[this.monthNumber - 1];
291293
},
292-
get mountName() {
293-
return basic.months[this.mountNumber - 1];
294+
get monthName() {
295+
return basic.months[this.monthNumber - 1];
294296
},
295297
get dayNumber() {
296298
let dt = new Date();
@@ -1063,6 +1065,15 @@ class Button extends Basic_UIComponent {
10631065
}
10641066
}
10651067

1068+
get spaceX() {
1069+
return parseInt(this.contElement.style.paddingLeft) || 0;
1070+
}
1071+
1072+
set spaceX($value) {
1073+
this.contElement.style.paddingLeft = $value + "px";
1074+
this.contElement.style.paddingRight = $value + "px";
1075+
}
1076+
10661077
onClick($func) {
10671078
this.clickable = 1;
10681079
this._addEventListener("click", $func, this.buttonElement);
@@ -2025,6 +2036,7 @@ basic.resizeDetection.whenDetected = new ResizeObserver(function(entries) {
20252036
})
20262037

20272038
// When content is loaded,
2039+
20282040
window.addEventListener("load", function () {
2029-
basic.start()
2041+
basic.start();
20302042
});

0 commit comments

Comments
 (0)