Skip to content
chintown edited this page Sep 24, 2014 · 10 revisions

##FAQ

1. How the snapshot works?

It relies javascript to iterate the DOM elements of the page, and draws them on a html canvas.

2. Why there are some blank areas in the snapshot?

Page content, including images or lazy loaded blocks, might be hosted on a different domain.

Due to the security policy, javascript can not access cross-domain content.

3. How can I get a refined snapshot?

Instead of using extension's javascript, we can utilize the native snapshot functionality provided by Chrome.

4. Why the webpage is scrolled automatically when I try to refine the snapshot?

The native snapshot functionality, provided by Chrome, only works for current visible area.

To take a snapshot of whole page, we need to

  1. make multiple partial snapshots
  2. stitch them together like a panorama

So, the extension scrolls the webpage just like it moves the camera.

5. Why the snapshot a) does not fit to b) is overflowed from the height of window?

There are two way to implement mini-map:

  1. Make fixed-height snapshot.

    • if the page is short, the width of snapshot will overflow. (We are not good at horizontal scrolling)
    • if the page is long, the width of snapshot will become very narrow. (not good)
    fixed-height snapshot of short page ![fixed-height snapshot of long page] (https://raw.githubusercontent.com/chintown/monocle/master/imgs/fhlp.png)
  2. Make fixed-width snapshot.

    • if the page is short, the height of snapshot will not reach the bottom of window. (little bit ugly)
    • if the page is long, the height of snapshot will overflow from the window viewport. (We can scroll to reveal them)
    fixed-width snapshot of short page ![fixed-width snapshot of long page] (https://raw.githubusercontent.com/chintown/monocle/master/imgs/fwlp.png)

I choose the second way to implement it. Also makes it consists with SublimeText's minimap.

Bitdeli Badge

Clone this wiki locally