Closed fruscica closed 12 years ago
update:
am in the stretch run. specifically, trying to add controls to reader, starting with magnifier. below code fails at 'var magnifier' line. thx much for any insight.
// Initialize the reader element. Monocle.Events.listen( window, 'load', function () { var readerOptions = { flipper:Monocle.Flippers.Instant, panel:Monocle.Panels.Marginal };
Monocle.Reader('thereader', bookData, readerOptions, function (rdr) {
window.reader1 = rdr;
var magnifier = new Monocle.Controls.Magnifier(rdr);
rdr.addControl(magnifier);
rdr.moveTo({ page: 2 });
}
);
}
);
fwiw, my implementation is online at http://novel.opportunitv.com/
re: this code fragment:
Monocle.Reader('thereader', bookData, readerOptions, function (rdr) { window.reader1 = rdr; //var magnifier = new Monocle.Controls.Magnifier(rdr); //rdr.addControl(magnifier); rdr.moveTo({ page: 2 });
the above code works (i.e., page 2 shows on load). uncommenting the middle two lines yields no magnifier, and page 1 shows on load. thoughts? thx for any insight..
ok, let me see what i can learn/copy from the dubliners example...
Monocle.Controls.PlaceSaver is not a constructor? so says firebug (in firefox 8)...
all right, let's regroup. i had the wrong paths for the control js files. fixed now.
this code loads the 2nd page of my book:
Monocle.Reader('thereader', bookData, readerOptions, function (rdr) {
window.reader = rdr;
var scrubber = new Monocle.Controls.Scrubber(rdr);
rdr.addControl(scrubber);
rdr.moveTo({ page: 2 });
but no scrubber appears.
this is my only immediate-term need, as the scrubber is enough for returning readers to quickly find where they left off...
pls advise.
if you view the book (novel.opportunitv.com), you'll see that it is a great bet to get a lot of attention. by extension, then, monocle may get a lot of attention...
once my monocle-powered ebook is reader-friendly enough :-)
thx much for any insight...
it turns out that i have to link to the css for the controls.
sigh...
issue closed! :-)
Years are passing by ^) But I have the same issue with scrubber. Could you please share - what do you mean by "it turns out that i have to link to the css for the controls."?
hello all,
great app. am in the process of formatting an ebook using monocle. not always easy to identify the code needed to produce certain effects. in particular, i can't replicate the hyperlinks that are seen in the panels test. nor have i been able to add the magnifier control to the below script:
thx kindly for any insight.
best,
frank