Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail Navigation #104

Closed
photolover opened this issue Sep 12, 2013 · 5 comments
Closed

Thumbnail Navigation #104

photolover opened this issue Sep 12, 2013 · 5 comments

Comments

@photolover
Copy link

I think it would be a great addition to have a left and right arrow navigation for the thumbnails, in case you can't swipe or drag.

@artpolikarpov
Copy link
Owner

I promised myself never to do these arrows :-) Hundreds of plugins uses them. There's no shortage!

@photolover
Copy link
Author

Sorry for reopening -

I understand - but there is no plugin like fotorama!

So I added the arrows (sorry ;) like so

i added this to the class section

navprevClass = _mpviewerClass + '__navprev',
navnextClass = _mpviewerClass + '__navnext',

i added this to the fotorama elements

$navprev = $(div(navprevClass)).appendTo($navWrap),
$navnext = $(div(navnextClass)).appendTo($navWrap),


in the resize function

i changed the width of the __nav and ofset it from the left

    if (o_nav) {

width = width - 110; // subtract the space of both arrows
$nav
.stop()
.animate({width: width}, time).css({marginLeft: 45}); // and offset it from the left

      slideNavShaft({guessIndex: activeIndex, time: time, keep: true});
      if (o_navThumbs && frameAppend.nav) slideThumbBorder(time);
    }
    measuresSetFLAG = setFLAG || true;
    ready();
  }
}

my click function will be based on this code (if someone else is interested)

$navnext.on('click', function () {

var c = readPosition ($navShaft);
c = Math.abs(c) + 140; // + needs to be refined - my thumbs are 70x70
$navShaft.css(getTranslate (-c) );

});

My Problem is now the last thumb is cut off , where can I adjust / compensate for the reduced width so that the navshaft goes 110px further to the left?

example:
17 images in the gallery
last image is active

stage width = 987px
nav--thumbs width is 877px

navshaft -webkit-transform: translate3d(-251px, 0, 0);

how to get this result

-webkit-transform: translate3d(-361px, 0, 0);

I am not a professional and I hope it makes sense what I am trying to ask ; )

@artpolikarpov
Copy link
Owner

When you click on a Fotorama thumbnail, the next one rides under the cursor. There are no galleries that do the same.

Also you can drag and swipe them.

And even scroll horizontally with mousewheel and two fingers on trackpad.

Sorry, I can’t help you with your task.

@photolover
Copy link
Author

I know and I do not want to disable or remove these features - otherwise I would just use a different plugin.

let me clarify my question since I am not a great communicator- what determines the end of the thumbnail stripe .

what sets the limit of where I can drag like in the example above -251px (translate3d(-251px, 0, 0);)

@photolover
Copy link
Author

Never mind maybe it is not possible without a lot of work - anyway I appreciate all your hard work that you put into this great gallery!

I have got another suggestion but I will open a new topic.

Thanks for you quick response your are awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants