baker icon indicating copy to clipboard operation
baker copied to clipboard

TOC (index) appearance

Open andrewogi opened this issue 15 years ago • 10 comments

Hi! Is it possible to change appearance of the index.htm file? for ex. now it is flying up from the bottom of the screen. Can it be changed to fly from the left or right side of the screen? And second question is how to change gesture to show/hide it. Is it hard to make option of two finger swipe up to show index and to finger swipe down to hide it?

andrewogi avatar Oct 18 '11 16:10 andrewogi

Changing the edge the index bar is attached to is something we considered, but which didn't make the cut for release 3.0. It is definitely in the list though.

Changing the gesture is something we need to consider more carefully, both from a user-experience perspective and from a technical standpoint.

Simbul avatar Oct 18 '11 16:10 Simbul

I might add over Simbul's answer that from an interaction perspective the double-tap is already a standard, and we're not going to implement it unless there's a big change in the current interaction model: from Kindle to iBooks to every magazine the overlay is shown at double tap, and we are going to be consistent with that. :)

folletto avatar Oct 18 '11 16:10 folletto

I've just asked to make it optional, that designer or publisher will have a choice of behavioral model with their issue. And not to brake already a standard. Or we are going to be one of the same. Thank you for your answer.

andrewogi avatar Oct 18 '11 17:10 andrewogi

Sure: you can develop an alternative if you need it, there's absolutely no problem in doing that and if other people will find it useful it could be a good addition. :)

folletto avatar Oct 18 '11 17:10 folletto

Great! (:

andrewogi avatar Oct 18 '11 17:10 andrewogi

Well, actually, an ability to choose where toc should appear is nice.

densmirnov avatar Oct 18 '11 18:10 densmirnov

Yes. :) As Simbul was saying above that feature is already planned, it's tracked in Issue #106. :)

folletto avatar Oct 18 '11 20:10 folletto

Could someone kindly tell me how to hack the framework to have the menu appear on the top edge instead of the bottom one or at least where the edge is defined in the code?

lostinjapan avatar Jun 08 '12 05:06 lostinjapan

see replacements for the commented lines. these two changes will make it come in from the top

(void)setIndexViewHidden:(BOOL)hidden withAnimation:(BOOL)animation {
  CGRect frame;
  if (hidden) {
    //frame = CGRectMake(0, pageHeight + pageY, pageWidth, indexHeight);
    frame = CGRectMake(0, 0, pageWidth, 0-indexHeight );
  } else {
    //frame = CGRectMake(0, pageHeight + pageY - indexHeight, pageWidth, indexHeight);
    frame = CGRectMake(0, 20, pageWidth, indexHeight);
  }

  if (animation) {
    [UIView beginAnimations:@"slideIndexView" context:nil]; {
      [UIView setAnimationDuration:0.3];

      self.view.frame = frame;
    }
    [UIView commitAnimations];
  } else {
    self.view.frame = frame;
  }
}

Maxhodges avatar Jun 12 '12 11:06 Maxhodges

and this will make it come from left (> replaced with <):

  • (BOOL)stickToLeft { return (actualIndexHeight < actualIndexWidth); }

Sror avatar Feb 06 '13 14:02 Sror