Skip to content

Commit

Permalink
width fill, animate fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Nov 16, 2022
1 parent ac215b4 commit 7c34b20
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,39 @@ win.add(lines.createLine({
}]
}));

win.add(lines.createLine({
top: 550,
backgroundColor: "#c23ba2",
lineWidth: 10,
lineColor: "#fff",
width: Ti.UI.FILL,
height: 50,
elevation: 40,
borderRadius: 10,
maxValue: 10,
values: Array(8).fill().map(() => 10 * Math.random())
}));

const aniLines = lines.createLine({
top: 610,
backgroundColor: "#c23ba2",
lineWidth: 10,
lineColor: "#fff",
width: 100,
height: 50,
elevation: 40,
borderRadius: 10,
maxValue: 10,
values: Array(8).fill().map(() => 10 * Math.random())
})
win.add(aniLines);
var ani = Ti.UI.createAnimation({
width: 200,
duration: 2000,
autoreverse: true,
repeat: 3
});
aniLines.animate(ani);


win.addEventListener("open", function() {
Expand Down Expand Up @@ -190,6 +223,6 @@ win.addEventListener("open", function() {
})

lineView.addEventListener("click", function() {
lineView.values = lineView.values.map(() => Math.floor(Math.random() * 8));
lineView.values = Array(8).fill().map(() => 10 * Math.random());
lineView.redraw()
})

0 comments on commit 7c34b20

Please sign in to comment.