mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
hide forward/back button if there is no matching image
e.g. for the first/last photo in a sequence, or when there are gaps
This commit is contained in:
@@ -377,6 +377,14 @@ export default {
|
||||
.selectAll('img')
|
||||
.remove();
|
||||
|
||||
wrap
|
||||
.selectAll('button.back')
|
||||
.classed('hide', !_cache.images.forImageId.hasOwnProperty(+id - 1));
|
||||
wrap
|
||||
.selectAll('button.forward')
|
||||
.classed('hide', !_cache.images.forImageId.hasOwnProperty(+id + 1));
|
||||
|
||||
|
||||
getImageData(d.id,d.sequence_id).then(function () {
|
||||
|
||||
if (d.isPano) {
|
||||
@@ -467,11 +475,13 @@ export default {
|
||||
|
||||
controlsEnter
|
||||
.append('button')
|
||||
.classed('back', true)
|
||||
.on('click.back', step(-1))
|
||||
.text('◄');
|
||||
|
||||
controlsEnter
|
||||
.append('button')
|
||||
.classed('forward', true)
|
||||
.on('click.forward', step(1))
|
||||
.text('►');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user