Closed ghost closed 8 years ago
I have found the solution.
Can you write the solution you found? It will help other trying to implement a placesaver in monocle
This is the code:
<script type="text/javascript">
// Initialize the reader element.
Monocle.Events.listen(
window,
'load',
function () {
var readerOptions = {
panels: Monocle.Panels.Magic
};
var placeSaver = new Monocle.Controls.PlaceSaver('placesaver');
Monocle.Reader(
'book',
null,
{ panels: Monocle.Panels.Magic, place: placeSaver.savedPlace() },
function (rdr) {
window.reader = rdr;
rdr.addControl(placeSaver, 'invisible');
}
);
Monocle.Events.listen(
window,
'resize',
function () { window.reader.resized() }
);
}
);
</script>
Hello. I am trying to implement placesaver on Monocle, but I can not do it work.
The code I use is:
A second option I have tried is:
After changing the page and refreshing the browser the first page is always shown.
Thanks in advance.