Download images when clicking on them
This commit is contained in:
@@ -17,7 +17,8 @@ component ImagePreview inherits Rectangle {
|
||||
|
||||
touch := TouchArea {
|
||||
clicked => {
|
||||
Global.previewed-image = root.preview;
|
||||
Global.viewed-image = root.preview;
|
||||
Global.view-image(root.preview.asset-id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,26 +76,26 @@ component TimelineBlock inherits VerticalLayout {
|
||||
}
|
||||
|
||||
export component Timeline inherits ScrollView {
|
||||
mouse-drag-pan-enabled: true;
|
||||
viewport-height: rect.height;
|
||||
mouse-drag-pan-enabled: true;
|
||||
viewport-height: rect.height;
|
||||
|
||||
changed viewport-y => {
|
||||
Global.timeline-scrolled(-self.viewport-y);
|
||||
}
|
||||
|
||||
rect := Rectangle {
|
||||
y: 0;
|
||||
x: 0;
|
||||
changed viewport-y => {
|
||||
Global.timeline-scrolled(-self.viewport-y);
|
||||
}
|
||||
|
||||
rect := Rectangle {
|
||||
y: 0;
|
||||
x: 0;
|
||||
width: root.width;
|
||||
height: Global.timeline-height;
|
||||
preferred-width: self.width;
|
||||
preferred-height: self.height;
|
||||
for bucket[i] in Global.image-buckets : Rectangle {
|
||||
if bucket.visibility == Visibility.InView : TimelineBlock {
|
||||
width: root.width;
|
||||
height: Global.timeline-height;
|
||||
preferred-width: self.width;
|
||||
preferred-height: self.height;
|
||||
for bucket[i] in Global.image-buckets : Rectangle {
|
||||
if bucket.visibility == Visibility.InView : TimelineBlock {
|
||||
width: root.width;
|
||||
index: i;
|
||||
bucket: bucket;
|
||||
}
|
||||
}
|
||||
index: i;
|
||||
bucket: bucket;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user