Sliding Clock: BUGFIX: scroll down/up re-appearing in the middle of no where

master
lu713691 2022-10-04 01:11:49 +01:00
parent 482a1b96c1
commit 44cddcd963
No known key found for this signature in database
GPG Key ID: 5A448EB0FC623526
2 changed files with 6 additions and 5 deletions

View File

@ -187,7 +187,7 @@ class ShiftText {
if(to_y == null) if(to_y == null)
to_y = this.init_y; to_y = this.init_y;
this.setTextPosition(txt, this.init_x, g.getHeight() + 2*this.font_size); this.setTextPosition(txt, this.init_x, g.getHeight()*2);
this.moveTo(this.init_x,to_y); this.moveTo(this.init_x,to_y);
} }
scrollInFromLeft(txt,to_x){ scrollInFromLeft(txt,to_x){
@ -211,7 +211,7 @@ class ShiftText {
this.moveTo(g.getWidth() + this.font_size, this.init_y); this.moveTo(g.getWidth() + this.font_size, this.init_y);
} }
scrollOffToBottom(){ scrollOffToBottom(){
this.moveTo(this.init_x,g.getHeight() + this.font_size); this.moveTo(this.init_x,g.getHeight()*2);
} }
onFinished(finished_callback){ onFinished(finished_callback){
this.finished_callback = finished_callback; this.finished_callback = finished_callback;

View File

@ -17,6 +17,7 @@
angle_to_horizontal: 90, angle_to_horizontal: 90,
scroll_off: ['down'], scroll_off: ['down'],
scroll_in: ['up'], scroll_in: ['up'],
speed: 'vslow'
}, },
medium: { medium: {
size: 'msmall', size: 'msmall',
@ -56,7 +57,7 @@
}, },
large: { large: {
angle_to_horizontal: 90, angle_to_horizontal: 90,
speed: 'slow', speed: 'vslow',
color: 'major', color: 'major',
scroll_off: ['down'], scroll_off: ['down'],
scroll_in: ['up'] scroll_in: ['up']
@ -65,7 +66,7 @@
row_defs: [ row_defs: [
{ {
type: 'large', type: 'large',
init_coords: [0.7,0.99], init_coords: [0.8,0.99],
row_direction: [0.0,1.0], row_direction: [0.0,1.0],
alignment: 'centre-6', alignment: 'centre-6',
rows: 1 rows: 1
@ -78,7 +79,7 @@
}, },
{ {
type: 'large', type: 'large',
init_coords: [0.7,0.99], init_coords: [0.8,0.99],
row_direction: [0.0,1.0], row_direction: [0.0,1.0],
alignment: 'centre-6', alignment: 'centre-6',
rows: 1 rows: 1